summaryrefslogtreecommitdiff
path: root/gnu/packages/javascript.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-12-30 15:05:29 +0100
committerRicardo Wurmus <rekado@elephly.net>2020-12-30 15:08:31 +0100
commit2005aa4b1bb88e6aadf305fb029d736050fc8507 (patch)
tree9df20499a782d1586a4adb08c2ac8b376eb440ee /gnu/packages/javascript.scm
parent4408c4d046965fe4a99a72043ec42c730f94fb5e (diff)
gnu: Add js-xmldom-sre.
* gnu/packages/javascript.scm (js-xmldom-sre): New variable.
Diffstat (limited to 'gnu/packages/javascript.scm')
-rw-r--r--gnu/packages/javascript.scm43
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index aed2ead719..7bb2629a1e 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -226,6 +226,49 @@ be able to view it naturally and easily.")))
command-line interfaces. ")
(license license:expat)))
+(define-public js-xmldom-sre
+ ;; This commit corresponds to the untagged release 0.1.32
+ (let ((commit "3c79325bc2c9e5d27e3ba44b680fa8c5dd6a381d")
+ (revision "1"))
+ (package
+ (name "js-xmldom-sre")
+ (version "0.1.32")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/zorkow/xmldom/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0a88v0id3mjflpvjqhv8a28br0xvaaszxbf7alg6pxfbnkb69yyq"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (chdir (assoc-ref %build-inputs "source"))
+ (let ((esbuild (string-append (assoc-ref %build-inputs "esbuild")
+ "/bin/esbuild"))
+ (target (string-append %output "/share/javascript/xmldom-sre")))
+ (invoke esbuild
+ "--bundle"
+ "--minify"
+ "--platform=node"
+ (string-append "--outfile=" target "/dom-parser.min.js")
+ "dom-parser.js")))))
+ (native-inputs
+ `(("esbuild" ,esbuild)))
+ (home-page "https://github.com/zorkow/xmldom/")
+ (synopsis "DOM parser and XML serializer")
+ (description "This is a fork of the xmldom library. It allows the use
+of wicked-good-xpath together with xmldom.")
+ ;; One of these licenses may be selected.
+ (license (list license:expat
+ license:lgpl2.0)))))
+
(define-public js-respond
(package
(name "js-respond")