summary refs log tree commit diff
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2020-01-03 11:59:25 +0100
committerPierre Neidhardt <mail@ambrevar.xyz>2020-01-03 15:03:36 +0100
commitba42da245bdb50aa98eecfeea8d207cefa209d48 (patch)
tree1291f6177ec386cf81e5d1fd354e8145f0ae08d9
parent0aa203717eccf9cb6ed2ae0d9e91625aa60e32ec (diff)
downloadguix-ba42da245bdb50aa98eecfeea8d207cefa209d48.tar.gz
gnu: uglify-js: Move back next to sbcl-cl-uglify-js definition.
This fixes the bug which prevented uglify-js from being defined properly, and
cascaded back to all Common Lisp packages.

* gnu/packages/bioinformatics.scm: Replace javascript module with lisp-xyz.
* gnu/packages/cran.scm: Use lisp-xyz module.
* gnu/packages/javascript.scm (uglify-js): Move from here...
* gnu/packages/lisp-xyz.scm: ... To here.
* gnu/packages/web.scm: Replace javascript module with lisp-xyz.
* guix/build-system/minify.scm: Find uglify-js in the lisp-xyz module.
-rw-r--r--gnu/packages/bioinformatics.scm2
-rw-r--r--gnu/packages/cran.scm1
-rw-r--r--gnu/packages/javascript.scm48
-rw-r--r--gnu/packages/lisp-xyz.scm47
-rw-r--r--gnu/packages/web.scm2
-rw-r--r--guix/build-system/minify.scm4
6 files changed, 52 insertions, 52 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index b7b1777c24..613015c67e 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -85,10 +85,10 @@
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages java)
   #:use-module (gnu packages java-compression)
-  #:use-module (gnu packages javascript)
   #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages dlang)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages lisp-xyz)
   #:use-module (gnu packages logging)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages man)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index b263b6a425..2c43d3fc5f 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -62,6 +62,7 @@
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages java)
   #:use-module (gnu packages javascript)
+  #:use-module (gnu packages lisp-xyz)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mpi)
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index 6718274da2..83fa5ede4c 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -25,7 +25,6 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages lisp)
   #:use-module (gnu packages lisp-xyz)
   #:use-module (gnu packages readline)
   #:use-module (guix packages)
@@ -453,50 +452,3 @@ to use, and is very similar to Lua.  There is no need to interact with byzantine
 C++ template mechanisms, or worry about marking and unmarking garbage collection
 roots, or wrestle with obscure build systems.")
     (license license:isc)))
-
-(define-public uglify-js
-  (package
-    (inherit sbcl-cl-uglify-js)
-    (name "uglify-js")
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (let* ((bin    (string-append (assoc-ref %outputs "out") "/bin/"))
-              (script (string-append bin "uglify-js")))
-         (use-modules (guix build utils))
-         (mkdir-p bin)
-         (with-output-to-file script
-           (lambda _
-             (format #t "#!~a/bin/sbcl --script
- (require :asdf)
- (push (truename \"~a/lib/sbcl\") asdf:*central-registry*)"
-                     (assoc-ref %build-inputs "sbcl")
-                     (assoc-ref %build-inputs "sbcl-cl-uglify-js"))
-             ;; FIXME: cannot use progn here because otherwise it fails to
-             ;; find cl-uglify-js.
-             (for-each
-              write
-              '(;; Quiet, please!
-                (let ((*standard-output* (make-broadcast-stream))
-                      (*error-output* (make-broadcast-stream)))
-                  (asdf:load-system :cl-uglify-js))
-                (let ((file (cadr *posix-argv*)))
-                  (if file
-                      (format t "~a"
-                              (cl-uglify-js:ast-gen-code
-                               (cl-uglify-js:ast-mangle
-                                (cl-uglify-js:ast-squeeze
-                                 (with-open-file (in file)
-                                                 (parse-js:parse-js in))))
-                               :beautify nil))
-                      (progn
-                       (format *error-output*
-                               "Please provide a JavaScript file.~%")
-                       (sb-ext:exit :code 1))))))))
-         (chmod script #o755)
-         #t)))
-    (inputs
-     `(("sbcl" ,sbcl)
-       ("sbcl-cl-uglify-js" ,sbcl-cl-uglify-js)))
-    (synopsis "JavaScript compressor")))
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 3589640653..96d31118d7 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -823,6 +823,53 @@ compressor.  It works on data produced by @code{parse-js} to generate a
 (define-public cl-uglify-js
   (sbcl-package->cl-source-package sbcl-cl-uglify-js))
 
+(define-public uglify-js
+  (package
+    (inherit sbcl-cl-uglify-js)
+    (name "uglify-js")
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (let* ((bin    (string-append (assoc-ref %outputs "out") "/bin/"))
+              (script (string-append bin "uglify-js")))
+         (use-modules (guix build utils))
+         (mkdir-p bin)
+         (with-output-to-file script
+           (lambda _
+             (format #t "#!~a/bin/sbcl --script
+ (require :asdf)
+ (push (truename \"~a/lib/sbcl\") asdf:*central-registry*)"
+                     (assoc-ref %build-inputs "sbcl")
+                     (assoc-ref %build-inputs "sbcl-cl-uglify-js"))
+             ;; FIXME: cannot use progn here because otherwise it fails to
+             ;; find cl-uglify-js.
+             (for-each
+              write
+              '(;; Quiet, please!
+                (let ((*standard-output* (make-broadcast-stream))
+                      (*error-output* (make-broadcast-stream)))
+                  (asdf:load-system :cl-uglify-js))
+                (let ((file (cadr *posix-argv*)))
+                  (if file
+                      (format t "~a"
+                              (cl-uglify-js:ast-gen-code
+                               (cl-uglify-js:ast-mangle
+                                (cl-uglify-js:ast-squeeze
+                                 (with-open-file (in file)
+                                                 (parse-js:parse-js in))))
+                               :beautify nil))
+                      (progn
+                       (format *error-output*
+                               "Please provide a JavaScript file.~%")
+                       (sb-ext:exit :code 1))))))))
+         (chmod script #o755)
+         #t)))
+    (inputs
+     `(("sbcl" ,sbcl)
+       ("sbcl-cl-uglify-js" ,sbcl-cl-uglify-js)))
+    (synopsis "JavaScript compressor")))
+
 (define-public sbcl-cl-strings
   (let ((revision "1")
         (commit "c5c5cbafbf3e6181d03c354d66e41a4f063f00ae"))
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 3a8a04c76d..65038f7c66 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -103,7 +103,6 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages java)
-  #:use-module (gnu packages javascript)
   #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
@@ -111,6 +110,7 @@
   #:use-module (gnu packages libidn)
   #:use-module (gnu packages libunistring)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages lisp-xyz)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages markup)
   #:use-module (gnu packages ncurses)
diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
index 1418a71091..28a6781c06 100644
--- a/guix/build-system/minify.scm
+++ b/guix/build-system/minify.scm
@@ -44,8 +44,8 @@
 (define (default-uglify-js)
   "Return the default package to minify JavaScript source files."
   ;; Lazily resolve the binding to avoid a circular dependency.
-  (let ((js-mod (resolve-interface '(gnu packages javascript))))
-    (module-ref js-mod 'uglify-js)))
+  (let ((mod (resolve-interface '(gnu packages lisp-xyz))))
+    (module-ref mod 'uglify-js)))
 
 (define* (lower name
                 #:key source inputs native-inputs outputs system