GNU bug report logs -
#27449
[PATCH] gnu: Add js-respond.
Previous Next
Full log
View this message in rfc822 format
Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de> skribis:
> * gnu/packages/javascript.scm (js-respond): New variable.
LGTM.
> + (build-system trivial-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/")))
> + (system* "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)))
Should we turn this into a ‘javascript-build-system’?
Thanks,
Ludo’.
This bug report was last modified 7 years and 341 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.