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.
This commit is contained in:
Efraim Flashner 2019-09-08 16:14:41 +03:00
parent e452c69aa8
commit 367d0833c3
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 4 additions and 30 deletions

View File

@ -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