(name "js-respond")
(version "1.4.2")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/scottjehl/Respond/"
- "archive/" version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/scottjehl/Respond")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0ds1ya2a185jp93mdn07159c2x8zczwi960ykrawpp62bwk2n93d"))))
- (build-system trivial-build-system)
+ "00xid731rirc7sdy1gc8qal3v9g0agr2qx15hm4x97l1lcbylyn2"))))
+ (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
(name "js-filesaver")
(version "1.3.8")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/eligrey/FileSaver.js/"
- "archive/" version ".tar.gz"))
- (file-name (string-append name "-" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/eligrey/FileSaver.js")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1rkhfqs5plaj628kzj7qgm5qahy4v7ihygifidqr6g6265mil97h"))))
+ "0gvqk0hnr8fig0n4da7vj7q6z31bcyv52916xz3rbmdj3pgpiv1d"))))
(build-system minify-build-system)
(arguments
`(#:phases