diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2019-09-08 16:14:41 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2019-09-08 19:03:45 +0300 |
commit | 367d0833c3c4d6828fe47bee5513a8ac78016c3e (patch) | |
tree | e381d0638a02c0d2ffbc90d99766925eca763bb7 /gnu/packages/javascript.scm | |
parent | e452c69aa89b2646c93235e4c4322e9f60040a1b (diff) | |
download | guix-367d0833c3c4d6828fe47bee5513a8ac78016c3e.tar guix-367d0833c3c4d6828fe47bee5513a8ac78016c3e.tar.gz |
gnu: js-respond: Use minify-build-system.
* gnu/packages/javascript.scm (js-respond)[build-system]: Use
minify-build-system.
[arguments]: Remove custom builder code.
[native-inputs]: Remove uglify-js, source, gzip, tar.
Diffstat (limited to 'gnu/packages/javascript.scm')
-rw-r--r-- | gnu/packages/javascript.scm | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index da285db0b9..ba0ccddff4 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -151,38 +151,12 @@ be able to view it naturally and easily."))) (sha256 (base32 "0ds1ya2a185jp93mdn07159c2x8zczwi960ykrawpp62bwk2n93d")))) - (build-system trivial-build-system) + (build-system minify-build-system) (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils) - (ice-9 match) - (ice-9 popen) - (srfi srfi-26)) - (set-path-environment-variable - "PATH" '("bin") (map (match-lambda - ((_ . input) - input)) - %build-inputs)) - (let ((install-directory (string-append %output - "/share/javascript/respond/"))) - (invoke "tar" "xvf" - (assoc-ref %build-inputs "source") - "--strip" "1") - (mkdir-p install-directory) - (let* ((file "src/respond.js") - (installed (string-append install-directory "respond.min.js"))) - (let ((minified (open-pipe* OPEN_READ "uglify-js" file))) - (call-with-output-file installed - (cut dump-port minified <>))))) - #t))) + `(#:javascript-files '("src/matchmedia.addListener.js" + "src/matchmedia.polyfill.js" + "src/respond.js"))) (home-page "https://github.com/scottjehl/Respond") - (native-inputs - `(("uglify-js" ,uglify-js) - ("source" ,source) - ("gzip" ,gzip) - ("tar" ,tar))) (synopsis "Polyfill for min/max-width CSS3 Media Queries") (description "The goal of this script is to provide a fast and lightweight script to enable responsive web designs in browsers that don't support CSS3 |