* [bug#49242] Update UglifyJs (& dependencies) and update dependents
@ 2021-06-27 16:01 Charles via Guix-patches via
[not found] ` <handler.49242.B.162480970015651.ack@debbugs.gnu.org>
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Charles via Guix-patches via @ 2021-06-27 16:01 UTC (permalink / raw)
To: 49242
[-- Attachment #1.1: Type: text/plain, Size: 188 bytes --]
Feedback on package guildlines welcome. More info about why I am making this change in the commit message. Let me know if you think the new uglify-js package should go in a different file.
[-- Attachment #1.2: Type: text/html, Size: 205 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-node-acorn.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-node-acorn.patch, Size: 1844 bytes --]
From 19a60318625b04f16861c89e6f1879d8b4f558d4 Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Sat, 26 Jun 2021 14:33:19 -0500
Subject: [PATCH] gnu: Add node-acorn.
* gnu/packages/node-xyz.scm (node-acorn): Add new variable.
---
gnu/packages/node-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 27a76f59c3..7818b44d9e 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -21,6 +21,7 @@
(define-module (gnu packages node-xyz)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system node))
@@ -330,3 +331,29 @@ function with browser support.")
Subsequent calls will either return the cached previous value or throw an error
if desired.")
(license license:isc)))
+
+(define-public node-acorn
+ (package
+ (name "node-acorn")
+ (version "8.4.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/acornjs/acorn/archive/refs/tags/"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0x049p4f0pdck168vc9zbagj1jw26g8d71dycckmd02y2rjddb9b"))))
+ (build-system node-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'change-directory
+ (lambda _
+ (chdir "acorn")
+ #t)))))
+ (home-page "https://github.com/acornjs/acorn/tree/master/acorn")
+ (synopsis "A small, fast, Javascript-based Javascript parser")
+ (description "Acornjs is a Javascrip parser with many options and an
+architecture supporting plugins.")
+ (license license:expat)))
--
2.32.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-gnu-Update-UglifyJs.patch --]
[-- Type: text/x-patch; name=0001-gnu-Update-UglifyJs.patch, Size: 20582 bytes --]
From 53b96b21be2946e84e9687096313557a83c2e103 Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Sat, 26 Jun 2021 14:44:23 -0500
Subject: [PATCH] gnu: Update UglifyJs.
This change is to update the UglifyJs library. This updated Javascript
implementation is by the same author as the original Common Lisp version and
is the official successor. It supports many commonly found features of
ECMAscript 6.
* gnu/packages/lisp-xyz.scm (uglify-js): Remove variable.
* gnu/packages/node-xyz.scm (node-uglify-js): Add new variable.
* guix/build-system/minify.scm (default-uglify-js): Update module-ref.
* gnu/packages/bioinformatics.scm (bismark): Update inputs.
* gnu/packages/ci.scm (laminar): Update inputs.
* gnu/packages/cran.scm (r-shiny): Update inputs.
* gnu/packages/cran.scm (r-shinytree): Update inputs.
* gnu/packages/cran.scm (r-colourpicker): Update inputs.
* gnu/packages/cran.scm (r-threejs): Update inputs.
* gnu/packages/cran.scm (r-flexdashboard): Update inputs.
* gnu/packages/cran.scm (r-bios2cor): Update inputs.
* gnu/packages/cran.scm (r-rintrojs): Update inputs.
* gnu/packages/cran.scm (r-dygraphs): Update inputs.
* gnu/packages/javascript.scm (js-mathjax): Update inputs.
* gnu/packages/web.scm (hpcguix-web): Update inputs.
---
gnu/packages/bioinformatics.scm | 6 ++--
gnu/packages/ci.scm | 6 ++--
gnu/packages/cran.scm | 36 ++++++++++-----------
gnu/packages/javascript.scm | 6 ++--
gnu/packages/lisp-xyz.scm | 52 ------------------------------
gnu/packages/node-xyz.scm | 24 ++++++++++++++
gnu/packages/web.scm | 4 +--
guix/build-system/minify.scm | 4 +--
guix/build/minify-build-system.scm | 2 +-
9 files changed, 56 insertions(+), 84 deletions(-)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 7a1c8cc8e3..d11159b88c 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -105,7 +105,6 @@
#:use-module (gnu packages java-compression)
#:use-module (gnu packages jemalloc)
#:use-module (gnu packages linux)
- #:use-module (gnu packages lisp-xyz)
#:use-module (gnu packages logging)
#:use-module (gnu packages lsof)
#:use-module (gnu packages machine-learning)
@@ -114,6 +113,7 @@
#:use-module (gnu packages mpi)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages node)
+ #:use-module (gnu packages node-xyz)
#:use-module (gnu packages ocaml)
#:use-module (gnu packages pcre)
#:use-module (gnu packages parallel)
@@ -9245,7 +9245,7 @@ Browser.")
(lambda* (#:key inputs #:allow-other-keys)
(let* ((file (assoc-ref inputs "plotly.js"))
(installed "plotly/plotly.js"))
- (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
+ (let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
(call-with-output-file installed
(cut dump-port minified <>))))
#t))
@@ -9303,7 +9303,7 @@ Browser.")
"v1.39.4/dist/plotly.js"))
(sha256
(base32 "138mwsr4nf5qif4mrxx286mpnagxd1xwl6k8aidrjgknaqg88zyr"))))
- ("uglify-js" ,uglify-js)))
+ ("node-uglify-js" ,node-uglify-js)))
(home-page "https://www.bioinformatics.babraham.ac.uk/projects/bismark/")
(synopsis "Map bisulfite treated sequence reads and analyze methylation")
(description "Bismark is a program to map bisulfite treated sequencing
diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
index 0bcde0fad5..9f9f5d6c20 100644
--- a/gnu/packages/ci.scm
+++ b/gnu/packages/ci.scm
@@ -38,7 +38,7 @@
#:use-module (gnu packages guile)
#:use-module (gnu packages guile-xyz)
#:use-module (gnu packages gnupg)
- #:use-module (gnu packages lisp-xyz)
+ #:use-module (gnu packages node-xyz)
#:use-module (gnu packages mail)
#:use-module (gnu packages package-management)
#:use-module (gnu packages perl)
@@ -252,7 +252,7 @@ intended as a replacement for Hydra.")
(let* ((file
(assoc-ref inputs (string-append name ".js")))
(port
- (open-pipe* OPEN_READ "uglify-js" file))
+ (open-pipe* OPEN_READ "uglifyjs" file))
(destination
(string-append
"../build/js/" name ".min.js")))
@@ -282,7 +282,7 @@ intended as a replacement for Hydra.")
("zlib" ,zlib)))
(native-inputs
`(("googletest" ,googletest)
- ("uglify-js" ,uglify-js)
+ ("node-uglify-js" ,node-uglify-js)
("vue.js"
,(origin (method url-fetch)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index e01b2417d2..69d98d34aa 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -83,13 +83,13 @@
#:use-module (gnu packages java)
#:use-module (gnu packages javascript)
#:use-module (gnu packages libevent)
- #:use-module (gnu packages lisp-xyz)
#:use-module (gnu packages machine-learning)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages networking)
#:use-module (gnu packages node)
+ #:use-module (gnu packages node-xyz)
#:use-module (gnu packages pcre)
#:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
@@ -1991,7 +1991,7 @@ previewing themes in real time.")
("js-strftime" ,js-strftime)
("js-highlight" ,js-highlight)))
(native-inputs
- `(("uglify-js" ,uglify-js)
+ `(("node-uglify-js" ,node-uglify-js)
("gfortran" ,gfortran)
("js-bootstrap-accessibility"
,(origin
@@ -2058,7 +2058,7 @@ responsive, and powerful applications with minimal effort.")
(for-each (lambda (source target)
(format #t "Processing ~a --> ~a~%"
source target)
- (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+ (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
(call-with-output-file target
(lambda (port)
(dump-port minified port)))))
@@ -2073,7 +2073,7 @@ responsive, and powerful applications with minimal effort.")
(inputs
`(("js-requirejs" ,js-requirejs)))
(native-inputs
- `(("uglify-js" ,uglify-js)
+ `(("node-uglify-js" ,node-uglify-js)
("js-jquery"
,(origin
(method url-fetch)
@@ -2111,7 +2111,7 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
(lambda _
(with-directory-excursion "inst/AdminLTE"
(delete-file "app.min.js")
- (let ((minified (open-pipe* OPEN_READ "uglify-js" "app.js")))
+ (let ((minified (open-pipe* OPEN_READ "uglifyjs" "app.js")))
(call-with-output-file "app.min.js"
(lambda (port)
(dump-port minified port))))))))))
@@ -2120,7 +2120,7 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
("r-promises" ,r-promises)
("r-shiny" ,r-shiny)))
(native-inputs
- `(("uglify-js" ,uglify-js)))
+ `(("node-uglify-js" ,node-uglify-js)))
(home-page "https://rstudio.github.io/shinydashboard/")
(synopsis "Create dashboards with shiny")
(description "This package provides an extension to the Shiny web
@@ -14849,7 +14849,7 @@ to easily call your own custom JavaScript functions from R.")
(format #t "Processing ~a --> ~a~%"
source target)
(delete-file target)
- (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+ (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
(call-with-output-file target
(lambda (port)
(dump-port minified port)))))
@@ -14865,7 +14865,7 @@ to easily call your own custom JavaScript functions from R.")
("r-shinyjs" ,r-shinyjs)))
(native-inputs
`(("r-knitr" ,r-knitr)
- ("uglify-js" ,uglify-js)
+ ("node-uglify-js" ,node-uglify-js)
("js-jquery"
,(origin
(method url-fetch)
@@ -17276,7 +17276,7 @@ and Learning to Rank measures (LambdaMart).")
(format #t "Processing ~a --> ~a~%"
source target)
(delete-file target)
- (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+ (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
(call-with-output-file target
(lambda (port)
(dump-port minified port)))))
@@ -17288,7 +17288,7 @@ and Learning to Rank measures (LambdaMart).")
("r-htmlwidgets" ,r-htmlwidgets)
("r-igraph" ,r-igraph)))
(native-inputs
- `(("uglify-js" ,uglify-js)
+ `(("node-uglify-js" ,node-uglify-js)
("js-jquery"
,(origin
(method url-fetch)
@@ -17523,7 +17523,7 @@ etc.). Text boxes with automatic word wrap are also supported.")
(for-each (lambda (source target)
(format #t "Processing ~a --> ~a~%"
source target)
- (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+ (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
(call-with-output-file target
(lambda (port)
(dump-port minified port)))))
@@ -17537,7 +17537,7 @@ etc.). Text boxes with automatic word wrap are also supported.")
("r-rmarkdown" ,r-rmarkdown)
("r-shiny" ,r-shiny)))
(native-inputs
- `(("uglify-js" ,uglify-js)
+ `(("node-uglify-js" ,node-uglify-js)
("js-raphael"
,(origin
(method url-fetch)
@@ -19380,14 +19380,14 @@ tools for help in data interpretation.")
(for-each (lambda (source target)
(format #t "Processing ~a --> ~a~%"
source target)
- (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+ (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
(call-with-output-file target
(lambda (port)
(dump-port minified port)))))
sources targets))))
#t)))))
(native-inputs
- `(("uglify-js" ,uglify-js)
+ `(("node-uglify-js" ,node-uglify-js)
;; NOTE: Make sure that this version of d3 is still valid when
;; upgrading the package.
("d3.v4.js"
@@ -19645,14 +19645,14 @@ cell free DNA} (cfDNA).")
(for-each (lambda (source target)
(format #t "Processing ~a --> ~a~%"
source target)
- (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+ (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
(call-with-output-file target
(lambda (port)
(dump-port minified port)))))
sources targets))))
#t)))))
(native-inputs
- `(("uglify-js" ,uglify-js)
+ `(("node-uglify-js" ,node-uglify-js)
("intro.js"
,(origin
(method url-fetch)
@@ -23716,14 +23716,14 @@ documents, Shiny applications, Plumber APIs, plots, and static web content.")
(for-each (lambda (source target)
(format #t "Processing ~a --> ~a~%"
source target)
- (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+ (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
(call-with-output-file target
(lambda (port)
(dump-port minified port)))))
sources targets))))
#t)))))
(native-inputs
- `(("uglify-js" ,uglify-js)
+ `(("uglify-js" ,node-uglify-js)
;; They actually use version 1.11.1, but this more recent version
;; should be just fine.
("js-jquery"
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index a935d321c5..2dc1c330a2 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -26,7 +26,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
- #:use-module (gnu packages lisp-xyz)
+ #:use-module (gnu packages node-xyz)
#:use-module (gnu packages readline)
#:use-module (gnu packages web)
#:use-module (guix packages)
@@ -163,7 +163,7 @@ context menu in TypeScript.")
(cond
((string-match "\\.js$" file)
(mkdir-p (dirname installed))
- (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
+ (let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
(call-with-output-file installed
(lambda (port)
(dump-port minified port)))
@@ -179,7 +179,7 @@ context menu in TypeScript.")
(native-inputs
`(("font-mathjax" ,font-mathjax)
("glibc-utf8-locales" ,glibc-utf8-locales)
- ("uglify-js" ,uglify-js)
+ ("node-uglify-js" ,node-uglify-js)
,@(package-native-inputs font-mathjax)))
(synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath")
(description "MathJax is a JavaScript display engine for LaTeX, MathML,
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index a4a5d6f543..3c891162ee 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -1276,58 +1276,6 @@ compressor. It works on data produced by @code{parse-js} to generate a
(define-public ecl-cl-uglify-js
(sbcl-package->ecl-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)
- (asdf:initialize-source-registry
- #p\"~a/etc/common-lisp/source-registry.conf.d/\")
- (asdf:initialize-output-translations
- #p\"~a/etc/common-lisp/asdf-output-translations.conf.d/\")"
- (assoc-ref %build-inputs "sbcl")
- (assoc-ref %build-inputs "sbcl-cl-uglify-js")
- (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/node-xyz.scm b/gnu/packages/node-xyz.scm
index 7818b44d9e..3661fdb0c4 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -357,3 +357,27 @@ if desired.")
(description "Acornjs is a Javascrip parser with many options and an
architecture supporting plugins.")
(license license:expat)))
+
+(define-public node-uglify-js
+ (package
+ (name "node-uglify-js")
+ (version "3.13.9")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/mishoo/UglifyJS/archive/refs/tags/v"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0dpgkqwyrkqlvixwl841375s134slnj3h0viff1cpxq81mxqph09"))))
+ (build-system node-build-system)
+ (inputs
+ `(("semver" ,node-semver)
+ ("acorn" ,node-acorn)))
+ (home-page "https://lisperator.net/uglifyjs/")
+ (synopsis "JavaScript parser / mangler / compressor / beautifier toolkit")
+ (description "UglifyJS is a JavaScript compressor/minifier written in
+JavaScript. It also contains tools that allow one to automate working with
+JavaScript code: parser, code generator, compressor, mangler, scope analyzer,
+tree walker, and tree transformer.")
+ (license license:bsd-2)))
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 412308b417..6d39103b5b 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -138,7 +138,7 @@
#:use-module (gnu packages libunistring)
#:use-module (gnu packages libunwind)
#:use-module (gnu packages linux)
- #:use-module (gnu packages lisp-xyz)
+ #:use-module (gnu packages node-xyz)
#:use-module (gnu packages lsof)
#:use-module (gnu packages lua)
#:use-module (gnu packages mail)
@@ -7759,7 +7759,7 @@ compressed JSON header blocks.
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
- ("uglify-js" ,uglify-js)
+ ("node-uglify-js" ,node-uglify-js)
("pkg-config" ,pkg-config)))
(inputs
`(("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))
diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
index 28a6781c06..add6b9f080 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 ((mod (resolve-interface '(gnu packages lisp-xyz))))
- (module-ref mod 'uglify-js)))
+ (let ((mod (resolve-interface '(gnu packages node-xyz))))
+ (module-ref mod 'node-uglify-js)))
(define* (lower name
#:key source inputs native-inputs outputs system
diff --git a/guix/build/minify-build-system.scm b/guix/build/minify-build-system.scm
index 92158a033f..c5a876726f 100644
--- a/guix/build/minify-build-system.scm
+++ b/guix/build/minify-build-system.scm
@@ -39,7 +39,7 @@
(format #t "minifying ~a\n" file)
(let* ((base (basename file ".js"))
(installed (or target (string-append directory base ".min.js")))
- (minified (open-pipe* OPEN_READ "uglify-js" file)))
+ (minified (open-pipe* OPEN_READ "uglifyjs" file)))
(call-with-output-file installed
(cut dump-port minified <>))
#t))
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#49242] Acknowledgement (Update UglifyJs (& dependencies) and update dependents)
[not found] ` <handler.49242.B.162480970015651.ack@debbugs.gnu.org>
@ 2021-07-05 1:50 ` Charles via Guix-patches via
2021-07-12 2:49 ` Charles via Guix-patches via
0 siblings, 1 reply; 11+ messages in thread
From: Charles via Guix-patches via @ 2021-07-05 1:50 UTC (permalink / raw)
To: 49242
Hello guix, has anyone taken a look at this? I'm happy to fix something if it is wrong in any way.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, June 27th, 2021 at 11:02 AM, <help-debbugs@gnu.org> wrote:
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
>
> has been received.
>
> Your message is being forwarded to the package maintainers and other
>
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>
> guix-patches@gnu.org
>
> If you wish to submit further information on this problem, please
>
> send it to 49242@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
>
> to report a problem with the Bug-tracking system.
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> 49242: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49242
>
> GNU Bug Tracking System
>
> Contact help-debbugs@gnu.org with problems
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#49242] Acknowledgement (Update UglifyJs (& dependencies) and update dependents)
2021-07-05 1:50 ` [bug#49242] Acknowledgement (Update UglifyJs (& dependencies) and update dependents) Charles via Guix-patches via
@ 2021-07-12 2:49 ` Charles via Guix-patches via
2021-07-12 7:24 ` Pierre Neidhardt
0 siblings, 1 reply; 11+ messages in thread
From: Charles via Guix-patches via @ 2021-07-12 2:49 UTC (permalink / raw)
To: 49242, rekado@elephly.net, efraim@flashner.co.il,
mail@ambrevar.xyz
As contributers to the minify-build-system, could Ricardo, Efraim, and Pierre Neidhardt provide some input here?
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, July 4th, 2021 at 8:50 PM, Charles <charles.b.jackson@protonmail.com> wrote:
> Hello guix, has anyone taken a look at this? I'm happy to fix something if it is wrong in any way.
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>
> On Sunday, June 27th, 2021 at 11:02 AM, help-debbugs@gnu.org wrote:
>
> > Thank you for filing a new bug report with debbugs.gnu.org.
> >
> > This is an automatically generated reply to let you know your message
> >
> > has been received.
> >
> > Your message is being forwarded to the package maintainers and other
> >
> > interested parties for their attention; they will reply in due course.
> >
> > Your message has been sent to the package maintainer(s):
> >
> > guix-patches@gnu.org
> >
> > If you wish to submit further information on this problem, please
> >
> > send it to 49242@debbugs.gnu.org.
> >
> > Please do not send mail to help-debbugs@gnu.org unless you wish
> >
> > to report a problem with the Bug-tracking system.
> >
> > 49242: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49242
> >
> > GNU Bug Tracking System
> >
> > Contact help-debbugs@gnu.org with problems
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#49242] Acknowledgement (Update UglifyJs (& dependencies) and update dependents)
2021-07-12 2:49 ` Charles via Guix-patches via
@ 2021-07-12 7:24 ` Pierre Neidhardt
0 siblings, 0 replies; 11+ messages in thread
From: Pierre Neidhardt @ 2021-07-12 7:24 UTC (permalink / raw)
To: Charles, 49242, rekado@elephly.net, efraim@flashner.co.il
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
Hi,
if I understand correctly, the "main" UglifyJS is the one written in
Node, while the Common Lisp version is just an alternative, which hasn't
been updated since 2015.
I could not find much information beyond this. Any details, any one?
It seems that your patch remove the public `uglify-js', which we should
not do since it would break backward compatibility. I believe you
should rename node-uglify-js to uglify-js then.
Cheers!
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#49242] Update UglifyJs (& dependencies) and update dependents
2021-06-27 16:01 [bug#49242] Update UglifyJs (& dependencies) and update dependents Charles via Guix-patches via
[not found] ` <handler.49242.B.162480970015651.ack@debbugs.gnu.org>
@ 2021-07-12 12:52 ` Efraim Flashner
2021-07-12 12:52 ` Efraim Flashner
2 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2021-07-12 12:52 UTC (permalink / raw)
To: Charles; +Cc: 49242
[-- Attachment #1: Type: text/plain, Size: 2509 bytes --]
On Sun, Jun 27, 2021 at 04:01:21PM +0000, Charles via Guix-patches via wrote:
> From 19a60318625b04f16861c89e6f1879d8b4f558d4 Mon Sep 17 00:00:00 2001
> From: Charles <charles.b.jackson@protonmail.com>
> Date: Sat, 26 Jun 2021 14:33:19 -0500
> Subject: [PATCH] gnu: Add node-acorn.
>
> * gnu/packages/node-xyz.scm (node-acorn): Add new variable.
> ---
> gnu/packages/node-xyz.scm | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index 27a76f59c3..7818b44d9e 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -21,6 +21,7 @@
> (define-module (gnu packages node-xyz)
> #:use-module ((guix licenses) #:prefix license:)
> #:use-module (guix packages)
> + #:use-module (guix download)
> #:use-module (guix git-download)
> #:use-module (guix build-system node))
>
> @@ -330,3 +331,29 @@ function with browser support.")
> Subsequent calls will either return the cached previous value or throw an error
> if desired.")
> (license license:isc)))
> +
> +(define-public node-acorn
> + (package
> + (name "node-acorn")
> + (version "8.4.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/acornjs/acorn/archive/refs/tags/"
> + version ".tar.gz"))
github '/archive/' links have a tendency to change over time, so it'd be
better to download using git-fetch.
> + (sha256
> + (base32 "0x049p4f0pdck168vc9zbagj1jw26g8d71dycckmd02y2rjddb9b"))))
> + (build-system node-build-system)
> + (arguments
> + '(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'change-directory
> + (lambda _
> + (chdir "acorn")
> + #t)))))
> + (home-page "https://github.com/acornjs/acorn/tree/master/acorn")
> + (synopsis "A small, fast, Javascript-based Javascript parser")
(synopsis "Javascript-based Javascript parser")
> + (description "Acornjs is a Javascrip parser with many options and an
beware the typo in Javascript :)
> +architecture supporting plugins.")
> + (license license:expat)))
> --
> 2.32.0
>
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#49242] Update UglifyJs (& dependencies) and update dependents
2021-06-27 16:01 [bug#49242] Update UglifyJs (& dependencies) and update dependents Charles via Guix-patches via
[not found] ` <handler.49242.B.162480970015651.ack@debbugs.gnu.org>
2021-07-12 12:52 ` [bug#49242] Update UglifyJs (& dependencies) and update dependents Efraim Flashner
@ 2021-07-12 12:52 ` Efraim Flashner
2021-07-13 5:36 ` Charles via Guix-patches via
2 siblings, 1 reply; 11+ messages in thread
From: Efraim Flashner @ 2021-07-12 12:52 UTC (permalink / raw)
To: Charles; +Cc: 49242
[-- Attachment #1: Type: text/plain, Size: 22958 bytes --]
This should be two patches, one to add node-uglify-js and one to switch
over to the new version. Other comments inline.
I'm torn on putting uglify-js in a separate package module. I'm not
entirely sure how deprecating packages works across modules, but I guess
that's what I suggested below.
It'd probably be best to put it in an uglifyjs.scm and rename the
package to uglifyjs instead of node-uglify-js.
On Sun, Jun 27, 2021 at 04:01:21PM +0000, Charles via Guix-patches via wrote:
> From 53b96b21be2946e84e9687096313557a83c2e103 Mon Sep 17 00:00:00 2001
> From: Charles <charles.b.jackson@protonmail.com>
> Date: Sat, 26 Jun 2021 14:44:23 -0500
> Subject: [PATCH] gnu: Update UglifyJs.
>
> This change is to update the UglifyJs library. This updated Javascript
> implementation is by the same author as the original Common Lisp version and
> is the official successor. It supports many commonly found features of
> ECMAscript 6.
>
> * gnu/packages/lisp-xyz.scm (uglify-js): Remove variable.
> * gnu/packages/node-xyz.scm (node-uglify-js): Add new variable.
> * guix/build-system/minify.scm (default-uglify-js): Update module-ref.
> * gnu/packages/bioinformatics.scm (bismark): Update inputs.
> * gnu/packages/ci.scm (laminar): Update inputs.
> * gnu/packages/cran.scm (r-shiny): Update inputs.
> * gnu/packages/cran.scm (r-shinytree): Update inputs.
> * gnu/packages/cran.scm (r-colourpicker): Update inputs.
> * gnu/packages/cran.scm (r-threejs): Update inputs.
> * gnu/packages/cran.scm (r-flexdashboard): Update inputs.
> * gnu/packages/cran.scm (r-bios2cor): Update inputs.
> * gnu/packages/cran.scm (r-rintrojs): Update inputs.
> * gnu/packages/cran.scm (r-dygraphs): Update inputs.
> * gnu/packages/javascript.scm (js-mathjax): Update inputs.
> * gnu/packages/web.scm (hpcguix-web): Update inputs.
> ---
> gnu/packages/bioinformatics.scm | 6 ++--
> gnu/packages/ci.scm | 6 ++--
> gnu/packages/cran.scm | 36 ++++++++++-----------
> gnu/packages/javascript.scm | 6 ++--
> gnu/packages/lisp-xyz.scm | 52 ------------------------------
> gnu/packages/node-xyz.scm | 24 ++++++++++++++
> gnu/packages/web.scm | 4 +--
> guix/build-system/minify.scm | 4 +--
> guix/build/minify-build-system.scm | 2 +-
> 9 files changed, 56 insertions(+), 84 deletions(-)
>
> diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> index 7a1c8cc8e3..d11159b88c 100644
> --- a/gnu/packages/bioinformatics.scm
> +++ b/gnu/packages/bioinformatics.scm
> @@ -105,7 +105,6 @@
> #:use-module (gnu packages java-compression)
> #:use-module (gnu packages jemalloc)
> #:use-module (gnu packages linux)
> - #:use-module (gnu packages lisp-xyz)
> #:use-module (gnu packages logging)
> #:use-module (gnu packages lsof)
> #:use-module (gnu packages machine-learning)
> @@ -114,6 +113,7 @@
> #:use-module (gnu packages mpi)
> #:use-module (gnu packages ncurses)
> #:use-module (gnu packages node)
> + #:use-module (gnu packages node-xyz)
> #:use-module (gnu packages ocaml)
> #:use-module (gnu packages pcre)
> #:use-module (gnu packages parallel)
> @@ -9245,7 +9245,7 @@ Browser.")
> (lambda* (#:key inputs #:allow-other-keys)
> (let* ((file (assoc-ref inputs "plotly.js"))
> (installed "plotly/plotly.js"))
> - (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
> + (let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
> (call-with-output-file installed
> (cut dump-port minified <>))))
> #t))
> @@ -9303,7 +9303,7 @@ Browser.")
> "v1.39.4/dist/plotly.js"))
> (sha256
> (base32 "138mwsr4nf5qif4mrxx286mpnagxd1xwl6k8aidrjgknaqg88zyr"))))
> - ("uglify-js" ,uglify-js)))
> + ("node-uglify-js" ,node-uglify-js)))
> (home-page "https://www.bioinformatics.babraham.ac.uk/projects/bismark/")
> (synopsis "Map bisulfite treated sequence reads and analyze methylation")
> (description "Bismark is a program to map bisulfite treated sequencing
> diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
> index 0bcde0fad5..9f9f5d6c20 100644
> --- a/gnu/packages/ci.scm
> +++ b/gnu/packages/ci.scm
> @@ -38,7 +38,7 @@
> #:use-module (gnu packages guile)
> #:use-module (gnu packages guile-xyz)
> #:use-module (gnu packages gnupg)
> - #:use-module (gnu packages lisp-xyz)
> + #:use-module (gnu packages node-xyz)
> #:use-module (gnu packages mail)
> #:use-module (gnu packages package-management)
> #:use-module (gnu packages perl)
> @@ -252,7 +252,7 @@ intended as a replacement for Hydra.")
> (let* ((file
> (assoc-ref inputs (string-append name ".js")))
> (port
> - (open-pipe* OPEN_READ "uglify-js" file))
> + (open-pipe* OPEN_READ "uglifyjs" file))
> (destination
> (string-append
> "../build/js/" name ".min.js")))
> @@ -282,7 +282,7 @@ intended as a replacement for Hydra.")
> ("zlib" ,zlib)))
> (native-inputs
> `(("googletest" ,googletest)
> - ("uglify-js" ,uglify-js)
> + ("node-uglify-js" ,node-uglify-js)
>
> ("vue.js"
> ,(origin (method url-fetch)
> diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
> index e01b2417d2..69d98d34aa 100644
> --- a/gnu/packages/cran.scm
> +++ b/gnu/packages/cran.scm
> @@ -83,13 +83,13 @@
> #:use-module (gnu packages java)
> #:use-module (gnu packages javascript)
> #:use-module (gnu packages libevent)
> - #:use-module (gnu packages lisp-xyz)
> #:use-module (gnu packages machine-learning)
> #:use-module (gnu packages maths)
> #:use-module (gnu packages mpi)
> #:use-module (gnu packages multiprecision)
> #:use-module (gnu packages networking)
> #:use-module (gnu packages node)
> + #:use-module (gnu packages node-xyz)
> #:use-module (gnu packages pcre)
> #:use-module (gnu packages pdf)
> #:use-module (gnu packages perl)
> @@ -1991,7 +1991,7 @@ previewing themes in real time.")
> ("js-strftime" ,js-strftime)
> ("js-highlight" ,js-highlight)))
> (native-inputs
> - `(("uglify-js" ,uglify-js)
> + `(("node-uglify-js" ,node-uglify-js)
> ("gfortran" ,gfortran)
> ("js-bootstrap-accessibility"
> ,(origin
> @@ -2058,7 +2058,7 @@ responsive, and powerful applications with minimal effort.")
> (for-each (lambda (source target)
> (format #t "Processing ~a --> ~a~%"
> source target)
> - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> + (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> (call-with-output-file target
> (lambda (port)
> (dump-port minified port)))))
> @@ -2073,7 +2073,7 @@ responsive, and powerful applications with minimal effort.")
> (inputs
> `(("js-requirejs" ,js-requirejs)))
> (native-inputs
> - `(("uglify-js" ,uglify-js)
> + `(("node-uglify-js" ,node-uglify-js)
> ("js-jquery"
> ,(origin
> (method url-fetch)
> @@ -2111,7 +2111,7 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
> (lambda _
> (with-directory-excursion "inst/AdminLTE"
> (delete-file "app.min.js")
> - (let ((minified (open-pipe* OPEN_READ "uglify-js" "app.js")))
> + (let ((minified (open-pipe* OPEN_READ "uglifyjs" "app.js")))
> (call-with-output-file "app.min.js"
> (lambda (port)
> (dump-port minified port))))))))))
> @@ -2120,7 +2120,7 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
> ("r-promises" ,r-promises)
> ("r-shiny" ,r-shiny)))
> (native-inputs
> - `(("uglify-js" ,uglify-js)))
> + `(("node-uglify-js" ,node-uglify-js)))
> (home-page "https://rstudio.github.io/shinydashboard/")
> (synopsis "Create dashboards with shiny")
> (description "This package provides an extension to the Shiny web
> @@ -14849,7 +14849,7 @@ to easily call your own custom JavaScript functions from R.")
> (format #t "Processing ~a --> ~a~%"
> source target)
> (delete-file target)
> - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> + (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> (call-with-output-file target
> (lambda (port)
> (dump-port minified port)))))
> @@ -14865,7 +14865,7 @@ to easily call your own custom JavaScript functions from R.")
> ("r-shinyjs" ,r-shinyjs)))
> (native-inputs
> `(("r-knitr" ,r-knitr)
> - ("uglify-js" ,uglify-js)
> + ("node-uglify-js" ,node-uglify-js)
> ("js-jquery"
> ,(origin
> (method url-fetch)
> @@ -17276,7 +17276,7 @@ and Learning to Rank measures (LambdaMart).")
> (format #t "Processing ~a --> ~a~%"
> source target)
> (delete-file target)
> - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> + (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> (call-with-output-file target
> (lambda (port)
> (dump-port minified port)))))
> @@ -17288,7 +17288,7 @@ and Learning to Rank measures (LambdaMart).")
> ("r-htmlwidgets" ,r-htmlwidgets)
> ("r-igraph" ,r-igraph)))
> (native-inputs
> - `(("uglify-js" ,uglify-js)
> + `(("node-uglify-js" ,node-uglify-js)
> ("js-jquery"
> ,(origin
> (method url-fetch)
> @@ -17523,7 +17523,7 @@ etc.). Text boxes with automatic word wrap are also supported.")
> (for-each (lambda (source target)
> (format #t "Processing ~a --> ~a~%"
> source target)
> - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> + (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> (call-with-output-file target
> (lambda (port)
> (dump-port minified port)))))
> @@ -17537,7 +17537,7 @@ etc.). Text boxes with automatic word wrap are also supported.")
> ("r-rmarkdown" ,r-rmarkdown)
> ("r-shiny" ,r-shiny)))
> (native-inputs
> - `(("uglify-js" ,uglify-js)
> + `(("node-uglify-js" ,node-uglify-js)
> ("js-raphael"
> ,(origin
> (method url-fetch)
> @@ -19380,14 +19380,14 @@ tools for help in data interpretation.")
> (for-each (lambda (source target)
> (format #t "Processing ~a --> ~a~%"
> source target)
> - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> + (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> (call-with-output-file target
> (lambda (port)
> (dump-port minified port)))))
> sources targets))))
> #t)))))
> (native-inputs
> - `(("uglify-js" ,uglify-js)
> + `(("node-uglify-js" ,node-uglify-js)
> ;; NOTE: Make sure that this version of d3 is still valid when
> ;; upgrading the package.
> ("d3.v4.js"
> @@ -19645,14 +19645,14 @@ cell free DNA} (cfDNA).")
> (for-each (lambda (source target)
> (format #t "Processing ~a --> ~a~%"
> source target)
> - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> + (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> (call-with-output-file target
> (lambda (port)
> (dump-port minified port)))))
> sources targets))))
> #t)))))
> (native-inputs
> - `(("uglify-js" ,uglify-js)
> + `(("node-uglify-js" ,node-uglify-js)
> ("intro.js"
> ,(origin
> (method url-fetch)
> @@ -23716,14 +23716,14 @@ documents, Shiny applications, Plumber APIs, plots, and static web content.")
> (for-each (lambda (source target)
> (format #t "Processing ~a --> ~a~%"
> source target)
> - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> + (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> (call-with-output-file target
> (lambda (port)
> (dump-port minified port)))))
> sources targets))))
> #t)))))
> (native-inputs
> - `(("uglify-js" ,uglify-js)
> + `(("uglify-js" ,node-uglify-js)
> ;; They actually use version 1.11.1, but this more recent version
> ;; should be just fine.
> ("js-jquery"
> diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
> index a935d321c5..2dc1c330a2 100644
> --- a/gnu/packages/javascript.scm
> +++ b/gnu/packages/javascript.scm
> @@ -26,7 +26,7 @@
> #:use-module (gnu packages)
> #:use-module (gnu packages base)
> #:use-module (gnu packages compression)
> - #:use-module (gnu packages lisp-xyz)
> + #:use-module (gnu packages node-xyz)
> #:use-module (gnu packages readline)
> #:use-module (gnu packages web)
> #:use-module (guix packages)
> @@ -163,7 +163,7 @@ context menu in TypeScript.")
> (cond
> ((string-match "\\.js$" file)
> (mkdir-p (dirname installed))
> - (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
> + (let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
> (call-with-output-file installed
> (lambda (port)
> (dump-port minified port)))
> @@ -179,7 +179,7 @@ context menu in TypeScript.")
> (native-inputs
> `(("font-mathjax" ,font-mathjax)
> ("glibc-utf8-locales" ,glibc-utf8-locales)
> - ("uglify-js" ,uglify-js)
> + ("node-uglify-js" ,node-uglify-js)
> ,@(package-native-inputs font-mathjax)))
> (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath")
> (description "MathJax is a JavaScript display engine for LaTeX, MathML,
> diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
> index a4a5d6f543..3c891162ee 100644
> --- a/gnu/packages/lisp-xyz.scm
> +++ b/gnu/packages/lisp-xyz.scm
> @@ -1276,58 +1276,6 @@ compressor. It works on data produced by @code{parse-js} to generate a
> (define-public ecl-cl-uglify-js
> (sbcl-package->ecl-package sbcl-cl-uglify-js))
>
It would be better to keep this and deprecate it, then people will have
a warning that it's changed.
(define-public uglify-js
(deprecated-package "uglify-js" node-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)
> - (asdf:initialize-source-registry
> - #p\"~a/etc/common-lisp/source-registry.conf.d/\")
> - (asdf:initialize-output-translations
> - #p\"~a/etc/common-lisp/asdf-output-translations.conf.d/\")"
> - (assoc-ref %build-inputs "sbcl")
> - (assoc-ref %build-inputs "sbcl-cl-uglify-js")
> - (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/node-xyz.scm b/gnu/packages/node-xyz.scm
> index 7818b44d9e..3661fdb0c4 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -357,3 +357,27 @@ if desired.")
> (description "Acornjs is a Javascrip parser with many options and an
> architecture supporting plugins.")
> (license license:expat)))
> +
> +(define-public node-uglify-js
> + (package
> + (name "node-uglify-js")
> + (version "3.13.9")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/mishoo/UglifyJS/archive/refs/tags/v"
> + version ".tar.gz"))
This one also should be downloaded using git-fetch.
> + (sha256
> + (base32 "0dpgkqwyrkqlvixwl841375s134slnj3h0viff1cpxq81mxqph09"))))
> + (build-system node-build-system)
> + (inputs
> + `(("semver" ,node-semver)
> + ("acorn" ,node-acorn)))
> + (home-page "https://lisperator.net/uglifyjs/")
> + (synopsis "JavaScript parser / mangler / compressor / beautifier toolkit")
Make sure you have two spaces between each sentence.
> + (description "UglifyJS is a JavaScript compressor/minifier written in
> +JavaScript. It also contains tools that allow one to automate working with
> +JavaScript code: parser, code generator, compressor, mangler, scope analyzer,
> +tree walker, and tree transformer.")
> + (license license:bsd-2)))
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 412308b417..6d39103b5b 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -138,7 +138,7 @@
> #:use-module (gnu packages libunistring)
> #:use-module (gnu packages libunwind)
> #:use-module (gnu packages linux)
> - #:use-module (gnu packages lisp-xyz)
> + #:use-module (gnu packages node-xyz)
> #:use-module (gnu packages lsof)
> #:use-module (gnu packages lua)
> #:use-module (gnu packages mail)
> @@ -7759,7 +7759,7 @@ compressed JSON header blocks.
> (native-inputs
> `(("autoconf" ,autoconf)
> ("automake" ,automake)
> - ("uglify-js" ,uglify-js)
> + ("node-uglify-js" ,node-uglify-js)
> ("pkg-config" ,pkg-config)))
> (inputs
> `(("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))
> diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
> index 28a6781c06..add6b9f080 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 ((mod (resolve-interface '(gnu packages lisp-xyz))))
> - (module-ref mod 'uglify-js)))
> + (let ((mod (resolve-interface '(gnu packages node-xyz))))
> + (module-ref mod 'node-uglify-js)))
>
> (define* (lower name
> #:key source inputs native-inputs outputs system
> diff --git a/guix/build/minify-build-system.scm b/guix/build/minify-build-system.scm
> index 92158a033f..c5a876726f 100644
> --- a/guix/build/minify-build-system.scm
> +++ b/guix/build/minify-build-system.scm
> @@ -39,7 +39,7 @@
> (format #t "minifying ~a\n" file)
> (let* ((base (basename file ".js"))
> (installed (or target (string-append directory base ".min.js")))
> - (minified (open-pipe* OPEN_READ "uglify-js" file)))
> + (minified (open-pipe* OPEN_READ "uglifyjs" file)))
> (call-with-output-file installed
> (cut dump-port minified <>))
> #t))
> --
> 2.32.0
>
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#49242] Update UglifyJs (& dependencies) and update dependents
2021-07-12 12:52 ` Efraim Flashner
@ 2021-07-13 5:36 ` Charles via Guix-patches via
2021-07-15 3:38 ` Charles via Guix-patches via
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Charles via Guix-patches via @ 2021-07-13 5:36 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 49242
[-- Attachment #1: Type: text/plain, Size: 26004 bytes --]
Here it is redone. This time, I didn't touch the Common Lisp or R uglify business and just made a new one. The R people are welcome to update their packages to use the up to date their UglifyJs. I took your advice and put a public uglifyjs variable in uglifyjs.scm. That way when UglifyJs is rewritten in Rust, the same (gnu packages uglifyjs) module can be used.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, July 12th, 2021 at 7:52 AM, Efraim Flashner <efraim@flashner.co.il> wrote:
> This should be two patches, one to add node-uglify-js and one to switch
>
> over to the new version. Other comments inline.
>
> I'm torn on putting uglify-js in a separate package module. I'm not
>
> entirely sure how deprecating packages works across modules, but I guess
>
> that's what I suggested below.
>
> It'd probably be best to put it in an uglifyjs.scm and rename the
>
> package to uglifyjs instead of node-uglify-js.
>
> On Sun, Jun 27, 2021 at 04:01:21PM +0000, Charles via Guix-patches via wrote:
>
> > From 53b96b21be2946e84e9687096313557a83c2e103 Mon Sep 17 00:00:00 2001
> >
> > From: Charles charles.b.jackson@protonmail.com
> >
> > Date: Sat, 26 Jun 2021 14:44:23 -0500
> >
> > Subject: [PATCH] gnu: Update UglifyJs.
> >
> > This change is to update the UglifyJs library. This updated Javascript
> >
> > implementation is by the same author as the original Common Lisp version and
> >
> > is the official successor. It supports many commonly found features of
> >
> > ECMAscript 6.
> >
> > - gnu/packages/lisp-xyz.scm (uglify-js): Remove variable.
> > - gnu/packages/node-xyz.scm (node-uglify-js): Add new variable.
> > - guix/build-system/minify.scm (default-uglify-js): Update module-ref.
> > - gnu/packages/bioinformatics.scm (bismark): Update inputs.
> > - gnu/packages/ci.scm (laminar): Update inputs.
> > - gnu/packages/cran.scm (r-shiny): Update inputs.
> > - gnu/packages/cran.scm (r-shinytree): Update inputs.
> > - gnu/packages/cran.scm (r-colourpicker): Update inputs.
> > - gnu/packages/cran.scm (r-threejs): Update inputs.
> > - gnu/packages/cran.scm (r-flexdashboard): Update inputs.
> > - gnu/packages/cran.scm (r-bios2cor): Update inputs.
> > - gnu/packages/cran.scm (r-rintrojs): Update inputs.
> > - gnu/packages/cran.scm (r-dygraphs): Update inputs.
> > - gnu/packages/javascript.scm (js-mathjax): Update inputs.
> > - gnu/packages/web.scm (hpcguix-web): Update inputs.
> >
> > gnu/packages/bioinformatics.scm | 6 ++--
> >
> > gnu/packages/ci.scm | 6 ++--
> >
> > gnu/packages/cran.scm | 36 ++++++++++-----------
> >
> > gnu/packages/javascript.scm | 6 ++--
> >
> > gnu/packages/lisp-xyz.scm | 52 ------------------------------
> >
> > gnu/packages/node-xyz.scm | 24 ++++++++++++++
> >
> > gnu/packages/web.scm | 4 +--
> >
> > guix/build-system/minify.scm | 4 +--
> >
> > guix/build/minify-build-system.scm | 2 +-
> >
> > 9 files changed, 56 insertions(+), 84 deletions(-)
> >
> > diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> >
> > index 7a1c8cc8e3..d11159b88c 100644
> >
> > --- a/gnu/packages/bioinformatics.scm
> >
> > +++ b/gnu/packages/bioinformatics.scm
> >
> > @@ -105,7 +105,6 @@
> >
> > #:use-module (gnu packages java-compression)
> >
> > #:use-module (gnu packages jemalloc)
> >
> > #:use-module (gnu packages linux)
> >
> > - #:use-module (gnu packages lisp-xyz)
> >
> > #:use-module (gnu packages logging)
> >
> > #:use-module (gnu packages lsof)
> >
> > #:use-module (gnu packages machine-learning)
> >
> > @@ -114,6 +113,7 @@
> >
> > #:use-module (gnu packages mpi)
> >
> > #:use-module (gnu packages ncurses)
> >
> > #:use-module (gnu packages node)
> >
> > - #:use-module (gnu packages node-xyz)
> >
> > #:use-module (gnu packages ocaml)
> >
> > #:use-module (gnu packages pcre)
> >
> > #:use-module (gnu packages parallel)
> >
> > @@ -9245,7 +9245,7 @@ Browser.")
> >
> > (lambda* (#:key inputs #:allow-other-keys)
> >
> > (let* ((file (assoc-ref inputs "plotly.js"))
> >
> > (installed "plotly/plotly.js"))
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
> >
> >
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
> > (call-with-output-file installed
> > (cut dump-port minified <>))))
> > #t))
> >
> >
> >
> > @@ -9303,7 +9303,7 @@ Browser.")
> >
> > "v1.39.4/dist/plotly.js"))
> >
> > (sha256
> >
> > (base32 "138mwsr4nf5qif4mrxx286mpnagxd1xwl6k8aidrjgknaqg88zyr"))))
> >
> > - ("uglify-js" ,uglify-js)))
> >
> >
> >
> > - ("node-uglify-js" ,node-uglify-js)))
> >
> >
> > (home-page "https://www.bioinformatics.babraham.ac.uk/projects/bismark/")
> >
> > (synopsis "Map bisulfite treated sequence reads and analyze methylation")
> >
> > (description "Bismark is a program to map bisulfite treated sequencing
> >
> > diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
> >
> > index 0bcde0fad5..9f9f5d6c20 100644
> >
> > --- a/gnu/packages/ci.scm
> >
> > +++ b/gnu/packages/ci.scm
> >
> > @@ -38,7 +38,7 @@
> >
> > #:use-module (gnu packages guile)
> >
> > #:use-module (gnu packages guile-xyz)
> >
> > #:use-module (gnu packages gnupg)
> >
> > - #:use-module (gnu packages lisp-xyz)
> >
> > - #:use-module (gnu packages node-xyz)
> >
> > #:use-module (gnu packages mail)
> >
> > #:use-module (gnu packages package-management)
> >
> > #:use-module (gnu packages perl)
> >
> > @@ -252,7 +252,7 @@ intended as a replacement for Hydra.")
> >
> > (let* ((file
> >
> > (assoc-ref inputs (string-append name ".js")))
> >
> > (port
> >
> > - (open-pipe* OPEN_READ "uglify-js" file))
> >
> >
> >
> > - (open-pipe* OPEN_READ "uglifyjs" file))
> > (destination
> > (string-append
> > "../build/js/" name ".min.js")))
> >
> >
> >
> > @@ -282,7 +282,7 @@ intended as a replacement for Hydra.")
> >
> > ("zlib" ,zlib)))
> >
> > (native-inputs
> >
> > `(("googletest" ,googletest)
> >
> > - ("uglify-js" ,uglify-js)
> >
> >
> >
> > - ("node-uglify-js" ,node-uglify-js)
> >
> > ("vue.js"
> > ,(origin (method url-fetch)
> >
> >
> >
> > diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
> >
> > index e01b2417d2..69d98d34aa 100644
> >
> > --- a/gnu/packages/cran.scm
> >
> > +++ b/gnu/packages/cran.scm
> >
> > @@ -83,13 +83,13 @@
> >
> > #:use-module (gnu packages java)
> >
> > #:use-module (gnu packages javascript)
> >
> > #:use-module (gnu packages libevent)
> >
> > - #:use-module (gnu packages lisp-xyz)
> >
> > #:use-module (gnu packages machine-learning)
> >
> > #:use-module (gnu packages maths)
> >
> > #:use-module (gnu packages mpi)
> >
> > #:use-module (gnu packages multiprecision)
> >
> > #:use-module (gnu packages networking)
> >
> > #:use-module (gnu packages node)
> >
> > - #:use-module (gnu packages node-xyz)
> >
> > #:use-module (gnu packages pcre)
> >
> > #:use-module (gnu packages pdf)
> >
> > #:use-module (gnu packages perl)
> >
> > @@ -1991,7 +1991,7 @@ previewing themes in real time.")
> >
> > ("js-strftime" ,js-strftime)
> >
> > ("js-highlight" ,js-highlight)))
> >
> > (native-inputs
> >
> > - `(("uglify-js" ,uglify-js)
> >
> >
> >
> > - `(("node-uglify-js" ,node-uglify-js)
> > ("gfortran" ,gfortran)
> > ("js-bootstrap-accessibility"
> > ,(origin
> >
> >
> >
> > @@ -2058,7 +2058,7 @@ responsive, and powerful applications with minimal effort.")
> >
> > (for-each (lambda (source target)
> >
> > (format #t "Processing ~a --> ~a~%"
> >
> > source target)
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> >
> >
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > (call-with-output-file target
> > (lambda (port)
> > (dump-port minified port)))))
> >
> >
> >
> > @@ -2073,7 +2073,7 @@ responsive, and powerful applications with minimal effort.")
> >
> > (inputs
> >
> > `(("js-requirejs" ,js-requirejs)))
> >
> > (native-inputs
> >
> > - `(("uglify-js" ,uglify-js)
> >
> >
> >
> > - `(("node-uglify-js" ,node-uglify-js)
> > ("js-jquery"
> > ,(origin
> > (method url-fetch)
> >
> >
> >
> > @@ -2111,7 +2111,7 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
> >
> > (lambda _
> >
> > (with-directory-excursion "inst/AdminLTE"
> >
> > (delete-file "app.min.js")
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglify-js" "app.js")))
> >
> >
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" "app.js")))
> > (call-with-output-file "app.min.js"
> > (lambda (port)
> > (dump-port minified port))))))))))
> >
> >
> >
> > @@ -2120,7 +2120,7 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
> >
> > ("r-promises" ,r-promises)
> >
> > ("r-shiny" ,r-shiny)))
> >
> > (native-inputs
> >
> > - `(("uglify-js" ,uglify-js)))
> >
> >
> >
> > - `(("node-uglify-js" ,node-uglify-js)))
> >
> >
> > (home-page "https://rstudio.github.io/shinydashboard/")
> >
> > (synopsis "Create dashboards with shiny")
> >
> > (description "This package provides an extension to the Shiny web
> >
> > @@ -14849,7 +14849,7 @@ to easily call your own custom JavaScript functions from R.")
> >
> > (format #t "Processing ~a --> ~a~%"
> >
> > source target)
> >
> > (delete-file target)
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> >
> >
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > (call-with-output-file target
> > (lambda (port)
> > (dump-port minified port)))))
> >
> >
> >
> > @@ -14865,7 +14865,7 @@ to easily call your own custom JavaScript functions from R.")
> >
> > ("r-shinyjs" ,r-shinyjs)))
> >
> > (native-inputs
> >
> > `(("r-knitr" ,r-knitr)
> >
> > - ("uglify-js" ,uglify-js)
> >
> >
> >
> > - ("node-uglify-js" ,node-uglify-js)
> > ("js-jquery"
> > ,(origin
> > (method url-fetch)
> >
> >
> >
> > @@ -17276,7 +17276,7 @@ and Learning to Rank measures (LambdaMart).")
> >
> > (format #t "Processing ~a --> ~a~%"
> >
> > source target)
> >
> > (delete-file target)
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> >
> >
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > (call-with-output-file target
> > (lambda (port)
> > (dump-port minified port)))))
> >
> >
> >
> > @@ -17288,7 +17288,7 @@ and Learning to Rank measures (LambdaMart).")
> >
> > ("r-htmlwidgets" ,r-htmlwidgets)
> >
> > ("r-igraph" ,r-igraph)))
> >
> > (native-inputs
> >
> > - `(("uglify-js" ,uglify-js)
> >
> >
> >
> > - `(("node-uglify-js" ,node-uglify-js)
> > ("js-jquery"
> > ,(origin
> > (method url-fetch)
> >
> >
> >
> > @@ -17523,7 +17523,7 @@ etc.). Text boxes with automatic word wrap are also supported.")
> >
> > (for-each (lambda (source target)
> >
> > (format #t "Processing ~a --> ~a~%"
> >
> > source target)
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> >
> >
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > (call-with-output-file target
> > (lambda (port)
> > (dump-port minified port)))))
> >
> >
> >
> > @@ -17537,7 +17537,7 @@ etc.). Text boxes with automatic word wrap are also supported.")
> >
> > ("r-rmarkdown" ,r-rmarkdown)
> >
> > ("r-shiny" ,r-shiny)))
> >
> > (native-inputs
> >
> > - `(("uglify-js" ,uglify-js)
> >
> >
> >
> > - `(("node-uglify-js" ,node-uglify-js)
> > ("js-raphael"
> > ,(origin
> > (method url-fetch)
> >
> >
> >
> > @@ -19380,14 +19380,14 @@ tools for help in data interpretation.")
> >
> > (for-each (lambda (source target)
> >
> > (format #t "Processing ~a --> ~a~%"
> >
> > source target)
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> >
> >
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > (call-with-output-file target
> > (lambda (port)
> > (dump-port minified port)))))
> > sources targets))))
> > #t)))))
> >
> >
> > (native-inputs
> >
> > - `(("uglify-js" ,uglify-js)
> >
> >
> >
> > - `(("node-uglify-js" ,node-uglify-js)
> > ;; NOTE: Make sure that this version of d3 is still valid when
> > ;; upgrading the package.
> > ("d3.v4.js"
> >
> >
> >
> > @@ -19645,14 +19645,14 @@ cell free DNA} (cfDNA).")
> >
> > (for-each (lambda (source target)
> >
> > (format #t "Processing ~a --> ~a~%"
> >
> > source target)
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> >
> >
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > (call-with-output-file target
> > (lambda (port)
> > (dump-port minified port)))))
> > sources targets))))
> > #t)))))
> >
> >
> > (native-inputs
> >
> > - `(("uglify-js" ,uglify-js)
> >
> >
> >
> > - `(("node-uglify-js" ,node-uglify-js)
> > ("intro.js"
> > ,(origin
> > (method url-fetch)
> >
> >
> >
> > @@ -23716,14 +23716,14 @@ documents, Shiny applications, Plumber APIs, plots, and static web content.")
> >
> > (for-each (lambda (source target)
> >
> > (format #t "Processing ~a --> ~a~%"
> >
> > source target)
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> >
> >
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > (call-with-output-file target
> > (lambda (port)
> > (dump-port minified port)))))
> > sources targets))))
> > #t)))))
> >
> >
> > (native-inputs
> >
> > - `(("uglify-js" ,uglify-js)
> >
> >
> >
> > - `(("uglify-js" ,node-uglify-js)
> > ;; They actually use version 1.11.1, but this more recent version
> > ;; should be just fine.
> > ("js-jquery"
> >
> >
> >
> > diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
> >
> > index a935d321c5..2dc1c330a2 100644
> >
> > --- a/gnu/packages/javascript.scm
> >
> > +++ b/gnu/packages/javascript.scm
> >
> > @@ -26,7 +26,7 @@
> >
> > #:use-module (gnu packages)
> >
> > #:use-module (gnu packages base)
> >
> > #:use-module (gnu packages compression)
> >
> > - #:use-module (gnu packages lisp-xyz)
> >
> > - #:use-module (gnu packages node-xyz)
> >
> > #:use-module (gnu packages readline)
> >
> > #:use-module (gnu packages web)
> >
> > #:use-module (guix packages)
> >
> > @@ -163,7 +163,7 @@ context menu in TypeScript.")
> >
> > (cond
> >
> > ((string-match "\\.js$" file)
> >
> > (mkdir-p (dirname installed))
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
> >
> >
> >
> > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
> > (call-with-output-file installed
> > (lambda (port)
> > (dump-port minified port)))
> >
> >
> >
> > @@ -179,7 +179,7 @@ context menu in TypeScript.")
> >
> > (native-inputs
> >
> > `(("font-mathjax" ,font-mathjax)
> >
> > ("glibc-utf8-locales" ,glibc-utf8-locales)
> >
> > - ("uglify-js" ,uglify-js)
> >
> >
> >
> > - ("node-uglify-js" ,node-uglify-js)
> > ,@(package-native-inputs font-mathjax)))
> >
> >
> > (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath")
> >
> > (description "MathJax is a JavaScript display engine for LaTeX, MathML,
> >
> > diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
> >
> > index a4a5d6f543..3c891162ee 100644
> >
> > --- a/gnu/packages/lisp-xyz.scm
> >
> > +++ b/gnu/packages/lisp-xyz.scm
> >
> > @@ -1276,58 +1276,6 @@ compressor. It works on data produced by @code{parse-js} to generate a
> >
> > (define-public ecl-cl-uglify-js
> >
> > (sbcl-package->ecl-package sbcl-cl-uglify-js))
>
> It would be better to keep this and deprecate it, then people will have
>
> a warning that it's changed.
>
> (define-public uglify-js
>
> (deprecated-package "uglify-js" node-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)
> > - (asdf:initialize-source-registry
> > - #p\"~a/etc/common-lisp/source-registry.conf.d/\")
> > - (asdf:initialize-output-translations
> > - #p\"~a/etc/common-lisp/asdf-output-translations.conf.d/\")"
> > - (assoc-ref %build-inputs "sbcl")
> >
> >
> > - (assoc-ref %build-inputs "sbcl-cl-uglify-js")
> >
> >
> > - (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/node-xyz.scm b/gnu/packages/node-xyz.scm
> >
> > index 7818b44d9e..3661fdb0c4 100644
> >
> > --- a/gnu/packages/node-xyz.scm
> >
> > +++ b/gnu/packages/node-xyz.scm
> >
> > @@ -357,3 +357,27 @@ if desired.")
> >
> > (description "Acornjs is a Javascrip parser with many options and an
> >
> > architecture supporting plugins.")
> >
> > (license license:expat)))
> >
> > +
> >
> > +(define-public node-uglify-js
> >
> > - (package
> > - (name "node-uglify-js")
> > - (version "3.13.9")
> > - (source
> > - (origin
> >
> >
> > - (method url-fetch)
> >
> >
> > - (uri (string-append
> >
> >
> > - "https://github.com/mishoo/UglifyJS/archive/refs/tags/v"
> >
> >
> > - version ".tar.gz"))
> >
> >
>
> This one also should be downloaded using git-fetch.
>
> > - (sha256
> >
> >
> > - (base32 "0dpgkqwyrkqlvixwl841375s134slnj3h0viff1cpxq81mxqph09"))))
> >
> >
> > - (build-system node-build-system)
> > - (inputs
> > - `(("semver" ,node-semver)
> >
> >
> > - ("acorn" ,node-acorn)))
> >
> >
> > - (home-page "https://lisperator.net/uglifyjs/")
> > - (synopsis "JavaScript parser / mangler / compressor / beautifier toolkit")
>
> Make sure you have two spaces between each sentence.
>
> > - (description "UglifyJS is a JavaScript compressor/minifier written in
> >
> > +JavaScript. It also contains tools that allow one to automate working with
> >
> > +JavaScript code: parser, code generator, compressor, mangler, scope analyzer,
> >
> > +tree walker, and tree transformer.")
> > - (license license:bsd-2)))
> >
> > diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> >
> > index 412308b417..6d39103b5b 100644
> >
> > --- a/gnu/packages/web.scm
> >
> > +++ b/gnu/packages/web.scm
> >
> > @@ -138,7 +138,7 @@
> >
> > #:use-module (gnu packages libunistring)
> >
> > #:use-module (gnu packages libunwind)
> >
> > #:use-module (gnu packages linux)
> >
> > - #:use-module (gnu packages lisp-xyz)
> >
> > - #:use-module (gnu packages node-xyz)
> >
> > #:use-module (gnu packages lsof)
> >
> > #:use-module (gnu packages lua)
> >
> > #:use-module (gnu packages mail)
> >
> > @@ -7759,7 +7759,7 @@ compressed JSON header blocks.
> >
> > (native-inputs
> >
> > `(("autoconf" ,autoconf)
> >
> > ("automake" ,automake)
> >
> > - ("uglify-js" ,uglify-js)
> >
> >
> >
> > - ("node-uglify-js" ,node-uglify-js)
> > ("pkg-config" ,pkg-config)))
> > (inputs
> > `(("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))
> >
> >
> >
> > diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
> >
> > index 28a6781c06..add6b9f080 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 ((mod (resolve-interface '(gnu packages lisp-xyz))))
> > - (module-ref mod 'uglify-js)))
> >
> > - (let ((mod (resolve-interface '(gnu packages node-xyz))))
> > - (module-ref mod 'node-uglify-js)))
> >
> > (define* (lower name
> >
> > #:key source inputs native-inputs outputs system
> >
> > diff --git a/guix/build/minify-build-system.scm b/guix/build/minify-build-system.scm
> >
> > index 92158a033f..c5a876726f 100644
> >
> > --- a/guix/build/minify-build-system.scm
> >
> > +++ b/guix/build/minify-build-system.scm
> >
> > @@ -39,7 +39,7 @@
> >
> > (format #t "minifying ~a\n" file)
> >
> > (let* ((base (basename file ".js"))
> >
> > (installed (or target (string-append directory base ".min.js")))
> >
> > - (minified (open-pipe* OPEN_READ "uglify-js" file)))
> >
> >
> >
> > - (minified (open-pipe* OPEN_READ "uglifyjs" file)))
> >
> >
> > (call-with-output-file installed
> >
> > (cut dump-port minified <>))
> >
> > #t))
> >
> > --
> >
> > 2.32.0
>
> --
>
> Efraim Flashner efraim@flashner.co.il אפרים פלשנר
>
> GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
>
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-gnu-Add-uglifyjs.patch --]
[-- Type: text/x-patch; name=0003-gnu-Add-uglifyjs.patch, Size: 1533 bytes --]
From 6f0ac1b59c6580d48f0cabcb2237a6a6e3309052 Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Mon, 12 Jul 2021 22:49:06 -0500
Subject: [PATCH 3/4] gnu: Add uglifyjs.
* gnu/packages/uglifyjs.scm (uglifyjs): Add new module.
---
gnu/packages/uglifyjs.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 gnu/packages/uglifyjs.scm
diff --git a/gnu/packages/uglifyjs.scm b/gnu/packages/uglifyjs.scm
new file mode 100644
index 0000000000..ce9f42e124
--- /dev/null
+++ b/gnu/packages/uglifyjs.scm
@@ -0,0 +1,21 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages uglifyjs)
+ #:use-module (gnu packages node-xyz))
+
+(define-public uglifyjs node-uglify-js)
--
2.32.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-node-uglify-js.patch --]
[-- Type: text/x-patch; name=0002-gnu-Add-node-uglify-js.patch, Size: 1829 bytes --]
From 37b46e3f25c9a27cdc6bb8f78c0ec29c7759a7a0 Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Mon, 12 Jul 2021 22:27:35 -0500
Subject: [PATCH 2/4] gnu: Add node-uglify-js.
* gnu/packages/node-xyz.scm (node-uglify-js): Add new variable.
---
gnu/packages/node-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index dc8ae8bb94..9e2f5a5e98 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -360,3 +360,30 @@ if desired.")
(description "Acornjs is a Javascrip parser with many options and an
architecture supporting plugins.")
(license license:expat))))
+
+(define-public node-uglify-js
+ (let ((commit "b23b333d9d6e97bece90fb7bc37a44870a7fecf7")
+ (revision "1"))
+ (package
+ (name "node-uglify-js")
+ (version (git-version "3.13.9" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mishoo/UglifyJS")
+ (commit commit)))
+ (git-file-name name version)
+ (sha256
+ (base32 "06yha17f9qy79ci8h3sgvg8x9l348ap95c4a3y9ln6c5syzyl6rd"))))
+ (build-system node-build-system)
+ (inputs
+ `(("semver" ,node-semver)
+ ("acorn" ,node-acorn)))
+ (home-page "https://lisperator.net/uglifyjs/")
+ (synopsis "JavaScript parser / mangler / compressor / beautifier toolkit")
+ (description "UglifyJS is a JavaScript compressor/minifier written in
+JavaScript. It also contains tools that allow one to automate working with
+JavaScript code: parser, code generator, compressor, mangler, scope analyzer,
+tree walker, and tree transformer.")
+ (license license:bsd-2))))
--
2.32.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0004-build-Use-updated-Uglifyjs-for-minify-build-system.patch --]
[-- Type: text/x-patch; name=0004-build-Use-updated-Uglifyjs-for-minify-build-system.patch, Size: 1771 bytes --]
From c200d15c4fc4fff4e7c339608b083579f04b8539 Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Mon, 12 Jul 2021 22:50:44 -0500
Subject: [PATCH 4/4] build: Use updated Uglifyjs for minify-build-system.
* guix/build-system/minify.scm (default-uglify-js): Update uglify-js package used.
* guix/build/minify-build-system.scm (minify): Use updated UglifyJs command name.
---
guix/build-system/minify.scm | 4 ++--
guix/build/minify-build-system.scm | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
index 28a6781c06..9d53760685 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 ((mod (resolve-interface '(gnu packages lisp-xyz))))
- (module-ref mod 'uglify-js)))
+ (let ((mod (resolve-interface '(gnu packages uglifyjs))))
+ (module-ref mod 'uglifyjs)))
(define* (lower name
#:key source inputs native-inputs outputs system
diff --git a/guix/build/minify-build-system.scm b/guix/build/minify-build-system.scm
index 92158a033f..c5a876726f 100644
--- a/guix/build/minify-build-system.scm
+++ b/guix/build/minify-build-system.scm
@@ -39,7 +39,7 @@
(format #t "minifying ~a\n" file)
(let* ((base (basename file ".js"))
(installed (or target (string-append directory base ".min.js")))
- (minified (open-pipe* OPEN_READ "uglify-js" file)))
+ (minified (open-pipe* OPEN_READ "uglifyjs" file)))
(call-with-output-file installed
(cut dump-port minified <>))
#t))
--
2.32.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0001-gnu-Add-node-acorn.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-node-acorn.patch, Size: 2109 bytes --]
From 321c2e32a7a78587401dc5d683468603c9a6d139 Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Sat, 26 Jun 2021 14:33:19 -0500
Subject: [PATCH 1/4] gnu: Add node-acorn.
* gnu/packages/node-xyz.scm (node-acorn): Add new variable.
---
gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 27a76f59c3..dc8ae8bb94 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
+;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -330,3 +331,32 @@ function with browser support.")
Subsequent calls will either return the cached previous value or throw an error
if desired.")
(license license:isc)))
+
+(define-public node-acorn
+ (let ((commit "9ef40d8ae2c08e07fd2f510bed58c3ca9edcbe46")
+ (revision "1"))
+ (package
+ (name "node-acorn")
+ (version (git-version "8.4.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/acornjs/acorn")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "068h5gysz8bbslq31dva8f223rdf8l7w6nxcxjnv4zdprwkzkhaa"))))
+ (build-system node-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'change-directory
+ (lambda _
+ (chdir "acorn")
+ #t)))))
+ (home-page "https://github.com/acornjs/acorn/tree/master/acorn")
+ (synopsis "A small, fast, Javascript-based Javascript parser")
+ (description "Acornjs is a Javascrip parser with many options and an
+architecture supporting plugins.")
+ (license license:expat))))
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#49242] Update UglifyJs (& dependencies) and update dependents
2021-07-13 5:36 ` Charles via Guix-patches via
@ 2021-07-15 3:38 ` Charles via Guix-patches via
2021-07-19 12:35 ` bug#49242: " Efraim Flashner
2021-07-19 12:34 ` [bug#49242] " Efraim Flashner
2021-07-19 12:34 ` Efraim Flashner
2 siblings, 1 reply; 11+ messages in thread
From: Charles via Guix-patches via @ 2021-07-15 3:38 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 49242
[-- Attachment #1: Type: text/plain, Size: 28558 bytes --]
My bad, I was missing a file-name for node-uglify-js. Here are fixes (actually tested this time 😏). I also tested the updated minify build system.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, July 13th, 2021 at 12:36 AM, Charles <charles.b.jackson@protonmail.com> wrote:
> Here it is redone. This time, I didn't touch the Common Lisp or R uglify business and just made a new one. The R people are welcome to update their packages to use the up to date their UglifyJs. I took your advice and put a public uglifyjs variable in uglifyjs.scm. That way when UglifyJs is rewritten in Rust, the same (gnu packages uglifyjs) module can be used.
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>
> On Monday, July 12th, 2021 at 7:52 AM, Efraim Flashner efraim@flashner.co.il wrote:
>
> > This should be two patches, one to add node-uglify-js and one to switch
> >
> > over to the new version. Other comments inline.
> >
> > I'm torn on putting uglify-js in a separate package module. I'm not
> >
> > entirely sure how deprecating packages works across modules, but I guess
> >
> > that's what I suggested below.
> >
> > It'd probably be best to put it in an uglifyjs.scm and rename the
> >
> > package to uglifyjs instead of node-uglify-js.
> >
> > On Sun, Jun 27, 2021 at 04:01:21PM +0000, Charles via Guix-patches via wrote:
> >
> > > From 53b96b21be2946e84e9687096313557a83c2e103 Mon Sep 17 00:00:00 2001
> > >
> > > From: Charles charles.b.jackson@protonmail.com
> > >
> > > Date: Sat, 26 Jun 2021 14:44:23 -0500
> > >
> > > Subject: [PATCH] gnu: Update UglifyJs.
> > >
> > > This change is to update the UglifyJs library. This updated Javascript
> > >
> > > implementation is by the same author as the original Common Lisp version and
> > >
> > > is the official successor. It supports many commonly found features of
> > >
> > > ECMAscript 6.
> > >
> > > - gnu/packages/lisp-xyz.scm (uglify-js): Remove variable.
> > > - gnu/packages/node-xyz.scm (node-uglify-js): Add new variable.
> > > - guix/build-system/minify.scm (default-uglify-js): Update module-ref.
> > > - gnu/packages/bioinformatics.scm (bismark): Update inputs.
> > > - gnu/packages/ci.scm (laminar): Update inputs.
> > > - gnu/packages/cran.scm (r-shiny): Update inputs.
> > > - gnu/packages/cran.scm (r-shinytree): Update inputs.
> > > - gnu/packages/cran.scm (r-colourpicker): Update inputs.
> > > - gnu/packages/cran.scm (r-threejs): Update inputs.
> > > - gnu/packages/cran.scm (r-flexdashboard): Update inputs.
> > > - gnu/packages/cran.scm (r-bios2cor): Update inputs.
> > > - gnu/packages/cran.scm (r-rintrojs): Update inputs.
> > > - gnu/packages/cran.scm (r-dygraphs): Update inputs.
> > > - gnu/packages/javascript.scm (js-mathjax): Update inputs.
> > > - gnu/packages/web.scm (hpcguix-web): Update inputs.
> > >
> > > gnu/packages/bioinformatics.scm | 6 ++--
> > >
> > > gnu/packages/ci.scm | 6 ++--
> > >
> > > gnu/packages/cran.scm | 36 ++++++++++-----------
> > >
> > > gnu/packages/javascript.scm | 6 ++--
> > >
> > > gnu/packages/lisp-xyz.scm | 52 ------------------------------
> > >
> > > gnu/packages/node-xyz.scm | 24 ++++++++++++++
> > >
> > > gnu/packages/web.scm | 4 +--
> > >
> > > guix/build-system/minify.scm | 4 +--
> > >
> > > guix/build/minify-build-system.scm | 2 +-
> > >
> > > 9 files changed, 56 insertions(+), 84 deletions(-)
> > >
> > > diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> > >
> > > index 7a1c8cc8e3..d11159b88c 100644
> > >
> > > --- a/gnu/packages/bioinformatics.scm
> > >
> > > +++ b/gnu/packages/bioinformatics.scm
> > >
> > > @@ -105,7 +105,6 @@
> > >
> > > #:use-module (gnu packages java-compression)
> > >
> > > #:use-module (gnu packages jemalloc)
> > >
> > > #:use-module (gnu packages linux)
> > >
> > > - #:use-module (gnu packages lisp-xyz)
> > >
> > > #:use-module (gnu packages logging)
> > >
> > > #:use-module (gnu packages lsof)
> > >
> > > #:use-module (gnu packages machine-learning)
> > >
> > > @@ -114,6 +113,7 @@
> > >
> > > #:use-module (gnu packages mpi)
> > >
> > > #:use-module (gnu packages ncurses)
> > >
> > > #:use-module (gnu packages node)
> > >
> > > - #:use-module (gnu packages node-xyz)
> > >
> > > #:use-module (gnu packages ocaml)
> > >
> > > #:use-module (gnu packages pcre)
> > >
> > > #:use-module (gnu packages parallel)
> > >
> > > @@ -9245,7 +9245,7 @@ Browser.")
> > >
> > > (lambda* (#:key inputs #:allow-other-keys)
> > >
> > > (let* ((file (assoc-ref inputs "plotly.js"))
> > >
> > > (installed "plotly/plotly.js"))
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
> > >
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
> > > (call-with-output-file installed
> > > (cut dump-port minified <>))))
> > > #t))
> > >
> > >
> > >
> > > @@ -9303,7 +9303,7 @@ Browser.")
> > >
> > > "v1.39.4/dist/plotly.js"))
> > >
> > > (sha256
> > >
> > > (base32 "138mwsr4nf5qif4mrxx286mpnagxd1xwl6k8aidrjgknaqg88zyr"))))
> > >
> > > - ("uglify-js" ,uglify-js)))
> > >
> > >
> > > - ("node-uglify-js" ,node-uglify-js)))
> > >
> > >
> > > (home-page "https://www.bioinformatics.babraham.ac.uk/projects/bismark/")
> > >
> > > (synopsis "Map bisulfite treated sequence reads and analyze methylation")
> > >
> > > (description "Bismark is a program to map bisulfite treated sequencing
> > >
> > > diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
> > >
> > > index 0bcde0fad5..9f9f5d6c20 100644
> > >
> > > --- a/gnu/packages/ci.scm
> > >
> > > +++ b/gnu/packages/ci.scm
> > >
> > > @@ -38,7 +38,7 @@
> > >
> > > #:use-module (gnu packages guile)
> > >
> > > #:use-module (gnu packages guile-xyz)
> > >
> > > #:use-module (gnu packages gnupg)
> > >
> > > - #:use-module (gnu packages lisp-xyz)
> > >
> > > - #:use-module (gnu packages node-xyz)
> > >
> > > #:use-module (gnu packages mail)
> > >
> > > #:use-module (gnu packages package-management)
> > >
> > > #:use-module (gnu packages perl)
> > >
> > > @@ -252,7 +252,7 @@ intended as a replacement for Hydra.")
> > >
> > > (let* ((file
> > >
> > > (assoc-ref inputs (string-append name ".js")))
> > >
> > > (port
> > >
> > > - (open-pipe* OPEN_READ "uglify-js" file))
> > >
> > >
> > > - (open-pipe* OPEN_READ "uglifyjs" file))
> > > (destination
> > > (string-append
> > > "../build/js/" name ".min.js")))
> > >
> > >
> > >
> > > @@ -282,7 +282,7 @@ intended as a replacement for Hydra.")
> > >
> > > ("zlib" ,zlib)))
> > >
> > > (native-inputs
> > >
> > > `(("googletest" ,googletest)
> > >
> > > - ("uglify-js" ,uglify-js)
> > >
> > >
> > > - ("node-uglify-js" ,node-uglify-js)
> > >
> > > ("vue.js"
> > > ,(origin (method url-fetch)
> > >
> > >
> > >
> > > diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
> > >
> > > index e01b2417d2..69d98d34aa 100644
> > >
> > > --- a/gnu/packages/cran.scm
> > >
> > > +++ b/gnu/packages/cran.scm
> > >
> > > @@ -83,13 +83,13 @@
> > >
> > > #:use-module (gnu packages java)
> > >
> > > #:use-module (gnu packages javascript)
> > >
> > > #:use-module (gnu packages libevent)
> > >
> > > - #:use-module (gnu packages lisp-xyz)
> > >
> > > #:use-module (gnu packages machine-learning)
> > >
> > > #:use-module (gnu packages maths)
> > >
> > > #:use-module (gnu packages mpi)
> > >
> > > #:use-module (gnu packages multiprecision)
> > >
> > > #:use-module (gnu packages networking)
> > >
> > > #:use-module (gnu packages node)
> > >
> > > - #:use-module (gnu packages node-xyz)
> > >
> > > #:use-module (gnu packages pcre)
> > >
> > > #:use-module (gnu packages pdf)
> > >
> > > #:use-module (gnu packages perl)
> > >
> > > @@ -1991,7 +1991,7 @@ previewing themes in real time.")
> > >
> > > ("js-strftime" ,js-strftime)
> > >
> > > ("js-highlight" ,js-highlight)))
> > >
> > > (native-inputs
> > >
> > > - `(("uglify-js" ,uglify-js)
> > >
> > >
> > > - `(("node-uglify-js" ,node-uglify-js)
> > > ("gfortran" ,gfortran)
> > > ("js-bootstrap-accessibility"
> > > ,(origin
> > >
> > >
> > >
> > > @@ -2058,7 +2058,7 @@ responsive, and powerful applications with minimal effort.")
> > >
> > > (for-each (lambda (source target)
> > >
> > > (format #t "Processing ~a --> ~a~%"
> > >
> > > source target)
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> > >
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > > (call-with-output-file target
> > > (lambda (port)
> > > (dump-port minified port)))))
> > >
> > >
> > >
> > > @@ -2073,7 +2073,7 @@ responsive, and powerful applications with minimal effort.")
> > >
> > > (inputs
> > >
> > > `(("js-requirejs" ,js-requirejs)))
> > >
> > > (native-inputs
> > >
> > > - `(("uglify-js" ,uglify-js)
> > >
> > >
> > > - `(("node-uglify-js" ,node-uglify-js)
> > > ("js-jquery"
> > > ,(origin
> > > (method url-fetch)
> > >
> > >
> > >
> > > @@ -2111,7 +2111,7 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
> > >
> > > (lambda _
> > >
> > > (with-directory-excursion "inst/AdminLTE"
> > >
> > > (delete-file "app.min.js")
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglify-js" "app.js")))
> > >
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" "app.js")))
> > > (call-with-output-file "app.min.js"
> > > (lambda (port)
> > > (dump-port minified port))))))))))
> > >
> > >
> > >
> > > @@ -2120,7 +2120,7 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
> > >
> > > ("r-promises" ,r-promises)
> > >
> > > ("r-shiny" ,r-shiny)))
> > >
> > > (native-inputs
> > >
> > > - `(("uglify-js" ,uglify-js)))
> > >
> > >
> > > - `(("node-uglify-js" ,node-uglify-js)))
> > >
> > >
> > > (home-page "https://rstudio.github.io/shinydashboard/")
> > >
> > > (synopsis "Create dashboards with shiny")
> > >
> > > (description "This package provides an extension to the Shiny web
> > >
> > > @@ -14849,7 +14849,7 @@ to easily call your own custom JavaScript functions from R.")
> > >
> > > (format #t "Processing ~a --> ~a~%"
> > >
> > > source target)
> > >
> > > (delete-file target)
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> > >
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > > (call-with-output-file target
> > > (lambda (port)
> > > (dump-port minified port)))))
> > >
> > >
> > >
> > > @@ -14865,7 +14865,7 @@ to easily call your own custom JavaScript functions from R.")
> > >
> > > ("r-shinyjs" ,r-shinyjs)))
> > >
> > > (native-inputs
> > >
> > > `(("r-knitr" ,r-knitr)
> > >
> > > - ("uglify-js" ,uglify-js)
> > >
> > >
> > > - ("node-uglify-js" ,node-uglify-js)
> > > ("js-jquery"
> > > ,(origin
> > > (method url-fetch)
> > >
> > >
> > >
> > > @@ -17276,7 +17276,7 @@ and Learning to Rank measures (LambdaMart).")
> > >
> > > (format #t "Processing ~a --> ~a~%"
> > >
> > > source target)
> > >
> > > (delete-file target)
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> > >
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > > (call-with-output-file target
> > > (lambda (port)
> > > (dump-port minified port)))))
> > >
> > >
> > >
> > > @@ -17288,7 +17288,7 @@ and Learning to Rank measures (LambdaMart).")
> > >
> > > ("r-htmlwidgets" ,r-htmlwidgets)
> > >
> > > ("r-igraph" ,r-igraph)))
> > >
> > > (native-inputs
> > >
> > > - `(("uglify-js" ,uglify-js)
> > >
> > >
> > > - `(("node-uglify-js" ,node-uglify-js)
> > > ("js-jquery"
> > > ,(origin
> > > (method url-fetch)
> > >
> > >
> > >
> > > @@ -17523,7 +17523,7 @@ etc.). Text boxes with automatic word wrap are also supported.")
> > >
> > > (for-each (lambda (source target)
> > >
> > > (format #t "Processing ~a --> ~a~%"
> > >
> > > source target)
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> > >
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > > (call-with-output-file target
> > > (lambda (port)
> > > (dump-port minified port)))))
> > >
> > >
> > >
> > > @@ -17537,7 +17537,7 @@ etc.). Text boxes with automatic word wrap are also supported.")
> > >
> > > ("r-rmarkdown" ,r-rmarkdown)
> > >
> > > ("r-shiny" ,r-shiny)))
> > >
> > > (native-inputs
> > >
> > > - `(("uglify-js" ,uglify-js)
> > >
> > >
> > > - `(("node-uglify-js" ,node-uglify-js)
> > > ("js-raphael"
> > > ,(origin
> > > (method url-fetch)
> > >
> > >
> > >
> > > @@ -19380,14 +19380,14 @@ tools for help in data interpretation.")
> > >
> > > (for-each (lambda (source target)
> > >
> > > (format #t "Processing ~a --> ~a~%"
> > >
> > > source target)
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> > >
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > > (call-with-output-file target
> > > (lambda (port)
> > > (dump-port minified port)))))
> > > sources targets))))
> > > #t)))))
> > >
> > >
> > > (native-inputs
> > >
> > > - `(("uglify-js" ,uglify-js)
> > >
> > >
> > > - `(("node-uglify-js" ,node-uglify-js)
> > > ;; NOTE: Make sure that this version of d3 is still valid when
> > > ;; upgrading the package.
> > > ("d3.v4.js"
> > >
> > >
> > >
> > > @@ -19645,14 +19645,14 @@ cell free DNA} (cfDNA).")
> > >
> > > (for-each (lambda (source target)
> > >
> > > (format #t "Processing ~a --> ~a~%"
> > >
> > > source target)
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> > >
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > > (call-with-output-file target
> > > (lambda (port)
> > > (dump-port minified port)))))
> > > sources targets))))
> > > #t)))))
> > >
> > >
> > > (native-inputs
> > >
> > > - `(("uglify-js" ,uglify-js)
> > >
> > >
> > > - `(("node-uglify-js" ,node-uglify-js)
> > > ("intro.js"
> > > ,(origin
> > > (method url-fetch)
> > >
> > >
> > >
> > > @@ -23716,14 +23716,14 @@ documents, Shiny applications, Plumber APIs, plots, and static web content.")
> > >
> > > (for-each (lambda (source target)
> > >
> > > (format #t "Processing ~a --> ~a~%"
> > >
> > > source target)
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
> > >
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
> > > (call-with-output-file target
> > > (lambda (port)
> > > (dump-port minified port)))))
> > > sources targets))))
> > > #t)))))
> > >
> > >
> > > (native-inputs
> > >
> > > - `(("uglify-js" ,uglify-js)
> > >
> > >
> > > - `(("uglify-js" ,node-uglify-js)
> > > ;; They actually use version 1.11.1, but this more recent version
> > > ;; should be just fine.
> > > ("js-jquery"
> > >
> > >
> > >
> > > diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
> > >
> > > index a935d321c5..2dc1c330a2 100644
> > >
> > > --- a/gnu/packages/javascript.scm
> > >
> > > +++ b/gnu/packages/javascript.scm
> > >
> > > @@ -26,7 +26,7 @@
> > >
> > > #:use-module (gnu packages)
> > >
> > > #:use-module (gnu packages base)
> > >
> > > #:use-module (gnu packages compression)
> > >
> > > - #:use-module (gnu packages lisp-xyz)
> > >
> > > - #:use-module (gnu packages node-xyz)
> > >
> > > #:use-module (gnu packages readline)
> > >
> > > #:use-module (gnu packages web)
> > >
> > > #:use-module (guix packages)
> > >
> > > @@ -163,7 +163,7 @@ context menu in TypeScript.")
> > >
> > > (cond
> > >
> > > ((string-match "\\.js$" file)
> > >
> > > (mkdir-p (dirname installed))
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
> > >
> > >
> > > - (let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
> > > (call-with-output-file installed
> > > (lambda (port)
> > > (dump-port minified port)))
> > >
> > >
> > >
> > > @@ -179,7 +179,7 @@ context menu in TypeScript.")
> > >
> > > (native-inputs
> > >
> > > `(("font-mathjax" ,font-mathjax)
> > >
> > > ("glibc-utf8-locales" ,glibc-utf8-locales)
> > >
> > > - ("uglify-js" ,uglify-js)
> > >
> > >
> > > - ("node-uglify-js" ,node-uglify-js)
> > > ,@(package-native-inputs font-mathjax)))
> > >
> > >
> > > (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath")
> > >
> > > (description "MathJax is a JavaScript display engine for LaTeX, MathML,
> > >
> > > diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
> > >
> > > index a4a5d6f543..3c891162ee 100644
> > >
> > > --- a/gnu/packages/lisp-xyz.scm
> > >
> > > +++ b/gnu/packages/lisp-xyz.scm
> > >
> > > @@ -1276,58 +1276,6 @@ compressor. It works on data produced by @code{parse-js} to generate a
> > >
> > > (define-public ecl-cl-uglify-js
> > >
> > > (sbcl-package->ecl-package sbcl-cl-uglify-js))
> > >
> >
> > It would be better to keep this and deprecate it, then people will have
> >
> > a warning that it's changed.
> >
> > (define-public uglify-js
> >
> > (deprecated-package "uglify-js" node-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)
> > >
> > > - (asdf:initialize-source-registry
> > >
> > > - #p\"~a/etc/common-lisp/source-registry.conf.d/\")
> > >
> > > - (asdf:initialize-output-translations
> > >
> > > - #p\"~a/etc/common-lisp/asdf-output-translations.conf.d/\")"
> > >
> > > - (assoc-ref %build-inputs "sbcl")
> > >
> > >
> > > - (assoc-ref %build-inputs "sbcl-cl-uglify-js")
> > >
> > >
> > > - (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/node-xyz.scm b/gnu/packages/node-xyz.scm
> > >
> > > index 7818b44d9e..3661fdb0c4 100644
> > >
> > > --- a/gnu/packages/node-xyz.scm
> > >
> > > +++ b/gnu/packages/node-xyz.scm
> > >
> > > @@ -357,3 +357,27 @@ if desired.")
> > >
> > > (description "Acornjs is a Javascrip parser with many options and an
> > >
> > > architecture supporting plugins.")
> > >
> > > (license license:expat)))
> > >
> > > +(define-public node-uglify-js
> > >
> > > - (package
> > >
> > > - (name "node-uglify-js")
> > >
> > > - (version "3.13.9")
> > >
> > > - (source
> > >
> > > - (origin
> > >
> > >
> > > - (method url-fetch)
> > >
> > >
> > > - (uri (string-append
> > >
> > >
> > > - "https://github.com/mishoo/UglifyJS/archive/refs/tags/v"
> > >
> > >
> > > - version ".tar.gz"))
> > >
> > >
> >
> > This one also should be downloaded using git-fetch.
> >
> > > - (sha256
> > >
> > >
> > > - (base32 "0dpgkqwyrkqlvixwl841375s134slnj3h0viff1cpxq81mxqph09"))))
> > >
> > >
> > > - (build-system node-build-system)
> > >
> > > - (inputs
> > >
> > > - `(("semver" ,node-semver)
> > >
> > >
> > > - ("acorn" ,node-acorn)))
> > >
> > >
> > > - (home-page "https://lisperator.net/uglifyjs/")
> > >
> > > - (synopsis "JavaScript parser / mangler / compressor / beautifier toolkit")
> > >
> >
> > Make sure you have two spaces between each sentence.
> >
> > > - (description "UglifyJS is a JavaScript compressor/minifier written in
> > >
> > > +JavaScript. It also contains tools that allow one to automate working with
> > >
> > > +JavaScript code: parser, code generator, compressor, mangler, scope analyzer,
> > >
> > > +tree walker, and tree transformer.")
> > >
> > > - (license license:bsd-2)))
> > >
> > > diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> > >
> > > index 412308b417..6d39103b5b 100644
> > >
> > > --- a/gnu/packages/web.scm
> > >
> > > +++ b/gnu/packages/web.scm
> > >
> > > @@ -138,7 +138,7 @@
> > >
> > > #:use-module (gnu packages libunistring)
> > >
> > > #:use-module (gnu packages libunwind)
> > >
> > > #:use-module (gnu packages linux)
> > >
> > > - #:use-module (gnu packages lisp-xyz)
> > >
> > > - #:use-module (gnu packages node-xyz)
> > >
> > > #:use-module (gnu packages lsof)
> > >
> > > #:use-module (gnu packages lua)
> > >
> > > #:use-module (gnu packages mail)
> > >
> > > @@ -7759,7 +7759,7 @@ compressed JSON header blocks.
> > >
> > > (native-inputs
> > >
> > > `(("autoconf" ,autoconf)
> > >
> > > ("automake" ,automake)
> > >
> > > - ("uglify-js" ,uglify-js)
> > >
> > >
> > > - ("node-uglify-js" ,node-uglify-js)
> > > ("pkg-config" ,pkg-config)))
> > > (inputs
> > > `(("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))
> > >
> > >
> > >
> > > diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
> > >
> > > index 28a6781c06..add6b9f080 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 ((mod (resolve-interface '(gnu packages lisp-xyz))))
> > >
> > > - (module-ref mod 'uglify-js)))
> > >
> > > - (let ((mod (resolve-interface '(gnu packages node-xyz))))
> > >
> > > - (module-ref mod 'node-uglify-js)))
> > >
> > >
> > > (define* (lower name
> > >
> > > #:key source inputs native-inputs outputs system
> > >
> > > diff --git a/guix/build/minify-build-system.scm b/guix/build/minify-build-system.scm
> > >
> > > index 92158a033f..c5a876726f 100644
> > >
> > > --- a/guix/build/minify-build-system.scm
> > >
> > > +++ b/guix/build/minify-build-system.scm
> > >
> > > @@ -39,7 +39,7 @@
> > >
> > > (format #t "minifying ~a\n" file)
> > >
> > > (let* ((base (basename file ".js"))
> > >
> > > (installed (or target (string-append directory base ".min.js")))
> > >
> > > - (minified (open-pipe* OPEN_READ "uglify-js" file)))
> > >
> > >
> > > - (minified (open-pipe* OPEN_READ "uglifyjs" file)))
> > >
> > >
> > > (call-with-output-file installed
> > >
> > > (cut dump-port minified <>))
> > >
> > > #t))
> > >
> > > --
> > >
> > > 2.32.0
> > >
> >
> > --
> >
> > Efraim Flashner efraim@flashner.co.il אפרים פלשנר
> >
> > GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
> >
> > Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Add-node-uglify-js.patch --]
[-- Type: text/x-patch; name=0002-gnu-Add-node-uglify-js.patch, Size: 1841 bytes --]
From 7d4a853b97e1157686f0efdfc8f7b674d068628c Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Mon, 12 Jul 2021 22:27:35 -0500
Subject: [PATCH 2/4] gnu: Add node-uglify-js.
* gnu/packages/node-xyz.scm (node-uglify-js): Add new variable.
---
gnu/packages/node-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index dc8ae8bb94..8a924ddc43 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -360,3 +360,30 @@ if desired.")
(description "Acornjs is a Javascrip parser with many options and an
architecture supporting plugins.")
(license license:expat))))
+
+(define-public node-uglify-js
+ (let ((commit "b23b333d9d6e97bece90fb7bc37a44870a7fecf7")
+ (revision "1"))
+ (package
+ (name "node-uglify-js")
+ (version (git-version "3.13.9" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mishoo/UglifyJS")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "06yha17f9qy79ci8h3sgvg8x9l348ap95c4a3y9ln6c5syzyl6rd"))))
+ (build-system node-build-system)
+ (inputs
+ `(("semver" ,node-semver)
+ ("acorn" ,node-acorn)))
+ (home-page "https://lisperator.net/uglifyjs/")
+ (synopsis "JavaScript parser / mangler / compressor / beautifier toolkit")
+ (description "UglifyJS is a JavaScript compressor/minifier written in
+JavaScript. It also contains tools that allow one to automate working with
+JavaScript code: parser, code generator, compressor, mangler, scope analyzer,
+tree walker, and tree transformer.")
+ (license license:bsd-2))))
--
2.32.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0003-gnu-Add-uglifyjs.patch --]
[-- Type: text/x-patch; name=0003-gnu-Add-uglifyjs.patch, Size: 1533 bytes --]
From abdc17ae9572fe8544f0ddd2358c5da8994f629a Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Mon, 12 Jul 2021 22:49:06 -0500
Subject: [PATCH 3/4] gnu: Add uglifyjs.
* gnu/packages/uglifyjs.scm (uglifyjs): Add new module.
---
gnu/packages/uglifyjs.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 gnu/packages/uglifyjs.scm
diff --git a/gnu/packages/uglifyjs.scm b/gnu/packages/uglifyjs.scm
new file mode 100644
index 0000000000..ce9f42e124
--- /dev/null
+++ b/gnu/packages/uglifyjs.scm
@@ -0,0 +1,21 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages uglifyjs)
+ #:use-module (gnu packages node-xyz))
+
+(define-public uglifyjs node-uglify-js)
--
2.32.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0001-gnu-Add-node-acorn.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-node-acorn.patch, Size: 2109 bytes --]
From 321c2e32a7a78587401dc5d683468603c9a6d139 Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Sat, 26 Jun 2021 14:33:19 -0500
Subject: [PATCH 1/4] gnu: Add node-acorn.
* gnu/packages/node-xyz.scm (node-acorn): Add new variable.
---
gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 27a76f59c3..dc8ae8bb94 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
+;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -330,3 +331,32 @@ function with browser support.")
Subsequent calls will either return the cached previous value or throw an error
if desired.")
(license license:isc)))
+
+(define-public node-acorn
+ (let ((commit "9ef40d8ae2c08e07fd2f510bed58c3ca9edcbe46")
+ (revision "1"))
+ (package
+ (name "node-acorn")
+ (version (git-version "8.4.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/acornjs/acorn")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "068h5gysz8bbslq31dva8f223rdf8l7w6nxcxjnv4zdprwkzkhaa"))))
+ (build-system node-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'change-directory
+ (lambda _
+ (chdir "acorn")
+ #t)))))
+ (home-page "https://github.com/acornjs/acorn/tree/master/acorn")
+ (synopsis "A small, fast, Javascript-based Javascript parser")
+ (description "Acornjs is a Javascrip parser with many options and an
+architecture supporting plugins.")
+ (license license:expat))))
--
2.32.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-build-Use-updated-Uglifyjs-for-minify-build-system.patch --]
[-- Type: text/x-patch; name=0004-build-Use-updated-Uglifyjs-for-minify-build-system.patch, Size: 1771 bytes --]
From 27fcf3b50fcef94d66f18917aa3786e6c8ce6096 Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Mon, 12 Jul 2021 22:50:44 -0500
Subject: [PATCH 4/4] build: Use updated Uglifyjs for minify-build-system.
* guix/build-system/minify.scm (default-uglify-js): Update uglify-js package used.
* guix/build/minify-build-system.scm (minify): Use updated UglifyJs command name.
---
guix/build-system/minify.scm | 4 ++--
guix/build/minify-build-system.scm | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
index 28a6781c06..9d53760685 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 ((mod (resolve-interface '(gnu packages lisp-xyz))))
- (module-ref mod 'uglify-js)))
+ (let ((mod (resolve-interface '(gnu packages uglifyjs))))
+ (module-ref mod 'uglifyjs)))
(define* (lower name
#:key source inputs native-inputs outputs system
diff --git a/guix/build/minify-build-system.scm b/guix/build/minify-build-system.scm
index 92158a033f..c5a876726f 100644
--- a/guix/build/minify-build-system.scm
+++ b/guix/build/minify-build-system.scm
@@ -39,7 +39,7 @@
(format #t "minifying ~a\n" file)
(let* ((base (basename file ".js"))
(installed (or target (string-append directory base ".min.js")))
- (minified (open-pipe* OPEN_READ "uglify-js" file)))
+ (minified (open-pipe* OPEN_READ "uglifyjs" file)))
(call-with-output-file installed
(cut dump-port minified <>))
#t))
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#49242] Update UglifyJs (& dependencies) and update dependents
2021-07-13 5:36 ` Charles via Guix-patches via
2021-07-15 3:38 ` Charles via Guix-patches via
@ 2021-07-19 12:34 ` Efraim Flashner
2021-07-19 12:34 ` Efraim Flashner
2 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2021-07-19 12:34 UTC (permalink / raw)
To: Charles; +Cc: 49242
[-- Attachment #1: Type: text/plain, Size: 2860 bytes --]
On Tue, Jul 13, 2021 at 05:36:54AM +0000, Charles wrote:
> From 321c2e32a7a78587401dc5d683468603c9a6d139 Mon Sep 17 00:00:00 2001
> From: Charles <charles.b.jackson@protonmail.com>
> Date: Sat, 26 Jun 2021 14:33:19 -0500
> Subject: [PATCH 1/4] gnu: Add node-acorn.
>
> * gnu/packages/node-xyz.scm (node-acorn): Add new variable.
> ---
> gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index 27a76f59c3..dc8ae8bb94 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -2,6 +2,7 @@
> ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
> ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
> ;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
> +;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -330,3 +331,32 @@ function with browser support.")
> Subsequent calls will either return the cached previous value or throw an error
> if desired.")
> (license license:isc)))
It wasn't mentioned at the top of the file but I moved this package so
it was sorted alphabetically.
> +(define-public node-acorn
> + (let ((commit "9ef40d8ae2c08e07fd2f510bed58c3ca9edcbe46")
> + (revision "1"))
There didn't seem to be a reason to use this commit specifically so I
switched the package to use the 8.4.1 release.
> + (package
> + (name "node-acorn")
> + (version (git-version "8.4.1" revision commit))
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/acornjs/acorn")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "068h5gysz8bbslq31dva8f223rdf8l7w6nxcxjnv4zdprwkzkhaa"))))
> + (build-system node-build-system)
> + (arguments
> + '(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'change-directory
> + (lambda _
> + (chdir "acorn")
> + #t)))))
> + (home-page "https://github.com/acornjs/acorn/tree/master/acorn")
> + (synopsis "A small, fast, Javascript-based Javascript parser")
After 'guix lint' I switched this to 'Javascript-based Javascript parser'
> + (description "Acornjs is a Javascrip parser with many options and an
> +architecture supporting plugins.")
> + (license license:expat))))
> --
> 2.32.0
>
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#49242] Update UglifyJs (& dependencies) and update dependents
2021-07-13 5:36 ` Charles via Guix-patches via
2021-07-15 3:38 ` Charles via Guix-patches via
2021-07-19 12:34 ` [bug#49242] " Efraim Flashner
@ 2021-07-19 12:34 ` Efraim Flashner
2 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2021-07-19 12:34 UTC (permalink / raw)
To: Charles; +Cc: 49242
[-- Attachment #1: Type: text/plain, Size: 2363 bytes --]
I combined patches 2 and 3 and moved node-uglify-js to uglify.scm. I
also registered uglify.scm in gnu/local.mk.
On Tue, Jul 13, 2021 at 05:36:54AM +0000, Charles wrote:
> From 37b46e3f25c9a27cdc6bb8f78c0ec29c7759a7a0 Mon Sep 17 00:00:00 2001
> From: Charles <charles.b.jackson@protonmail.com>
> Date: Mon, 12 Jul 2021 22:27:35 -0500
> Subject: [PATCH 2/4] gnu: Add node-uglify-js.
>
> * gnu/packages/node-xyz.scm (node-uglify-js): Add new variable.
> ---
> gnu/packages/node-xyz.scm | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index dc8ae8bb94..9e2f5a5e98 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -360,3 +360,30 @@ if desired.")
> (description "Acornjs is a Javascrip parser with many options and an
> architecture supporting plugins.")
> (license license:expat))))
> +
> +(define-public node-uglify-js
> + (let ((commit "b23b333d9d6e97bece90fb7bc37a44870a7fecf7")
> + (revision "1"))
> + (package
> + (name "node-uglify-js")
> + (version (git-version "3.13.9" revision commit))
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/mishoo/UglifyJS")
> + (commit commit)))
> + (git-file-name name version)
> + (sha256
> + (base32 "06yha17f9qy79ci8h3sgvg8x9l348ap95c4a3y9ln6c5syzyl6rd"))))
> + (build-system node-build-system)
> + (inputs
> + `(("semver" ,node-semver)
> + ("acorn" ,node-acorn)))
> + (home-page "https://lisperator.net/uglifyjs/")
> + (synopsis "JavaScript parser / mangler / compressor / beautifier toolkit")
> + (description "UglifyJS is a JavaScript compressor/minifier written in
> +JavaScript. It also contains tools that allow one to automate working with
> +JavaScript code: parser, code generator, compressor, mangler, scope analyzer,
> +tree walker, and tree transformer.")
> + (license license:bsd-2))))
> --
> 2.32.0
>
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#49242: Update UglifyJs (& dependencies) and update dependents
2021-07-15 3:38 ` Charles via Guix-patches via
@ 2021-07-19 12:35 ` Efraim Flashner
0 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2021-07-19 12:35 UTC (permalink / raw)
To: Charles; +Cc: 49242-done
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]
Thanks for the patches! Patches pushed.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-07-19 12:38 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-27 16:01 [bug#49242] Update UglifyJs (& dependencies) and update dependents Charles via Guix-patches via
[not found] ` <handler.49242.B.162480970015651.ack@debbugs.gnu.org>
2021-07-05 1:50 ` [bug#49242] Acknowledgement (Update UglifyJs (& dependencies) and update dependents) Charles via Guix-patches via
2021-07-12 2:49 ` Charles via Guix-patches via
2021-07-12 7:24 ` Pierre Neidhardt
2021-07-12 12:52 ` [bug#49242] Update UglifyJs (& dependencies) and update dependents Efraim Flashner
2021-07-12 12:52 ` Efraim Flashner
2021-07-13 5:36 ` Charles via Guix-patches via
2021-07-15 3:38 ` Charles via Guix-patches via
2021-07-19 12:35 ` bug#49242: " Efraim Flashner
2021-07-19 12:34 ` [bug#49242] " Efraim Flashner
2021-07-19 12:34 ` Efraim Flashner
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.