From 53d19fd513a98d6215fd41e368559162721e9802 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Thu, 26 Oct 2023 18:22:26 +0300 Subject: gn: htmx: Replace minify with trivial build system. Esbuild system has no support for ES5 and will lead to a build failure with the following output: `dist/htmx.js:1979:20: error: Transforming let to the configured target environment ("es5") is not supported yet` Signed-off-by: Munyoki Kilyungi --- gn/packages/javascript.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'gn/packages/javascript.scm') diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm index 9398bf2..9b5c34b 100644 --- a/gn/packages/javascript.scm +++ b/gn/packages/javascript.scm @@ -1891,15 +1891,23 @@ vector graphics.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/bigskysoftware/htmx") - (commit (string-append "v" version)))) + (url "https://github.com/bigskysoftware/htmx") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 - "14m9wan8sp5lzblfzbi1hln621p7ld3npajxrhq1a19zm5bcrz3y")))) - (build-system minify-build-system) + (base32 + "14m9wan8sp5lzblfzbi1hln621p7ld3npajxrhq1a19zm5bcrz3y")))) + (build-system trivial-build-system) (arguments - `(#:javascript-files '("dist/htmx.js"))) + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (targetdir (string-append out "/share/genenetwork2/javascript"))) + (mkdir-p targetdir) + (copy-file source (string-append targetdir "/htmx.min.js")))))) (home-page "https://htmx.org/") (synopsis "High Power Tools for HTML") (description -- cgit v1.2.3