diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-29 12:29:15 +0000 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-01-21 23:42:35 +0000 |
commit | a49dc18fd05b21103c5faa3f0c09b466ef64cc2b (patch) | |
tree | 3db7d41836ac8f8c48e261601d67f305e25bce14 | |
parent | 98a8f828e704992c6a7a968100480757373dc634 (diff) |
gnu: esbuild: Improve style.
* gnu/packages/web.scm (esbuild): Use G-expressions.
[source] <snippet>: Remove trailing #t.
[arguments] <test-flags>: Port Makefile options here.
<test-subdirs>: Likewise.
<phases>: Use default 'check.
[input]: Remove labels.
[description]: Adjust fill-column.
Change-Id: I95269f084e214b2c491b6813a1baf3615d9e79e1
-rw-r--r-- | gnu/packages/web.scm | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 359d9e2c03..460ce15dfa 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -1966,38 +1966,25 @@ UTS#46.") (base32 "1j99m7rdql6iq3llrr8bm85hq34ssc8bmb6vhwr1ibgspjl0jd3k")) (modules '((guix build utils))) (snippet - '(begin - ;; Remove prebuilt binaries - (delete-file-recursively "npm") - #t)))) + #~(begin + ;; Remove prebuilt binaries + (delete-file-recursively "npm"))))) (build-system go-build-system) (arguments - `(#:import-path "github.com/evanw/esbuild/cmd/esbuild" - #:unpack-path "github.com/evanw/esbuild" - #:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? unpack-path #:allow-other-keys) - (when tests? - ;; The "Go Race Detector" is only supported on 64-bit - ;; platforms, this variable disables it. - ;; TODO: Causes too many rebuilds, rewrite to limit to x86_64, - ;; aarch64 and ppc64le. - ,(if (target-riscv64?) - `(setenv "ESBUILD_RACE" "") - `(unless ,(target-64bit?) - (setenv "ESBUILD_RACE" ""))) - (with-directory-excursion (string-append "src/" unpack-path) - (invoke "make" "test-go"))) - #t))))) + (list + #:import-path "github.com/evanw/esbuild/cmd/esbuild" + #:unpack-path "github.com/evanw/esbuild" + #:test-flags #~(list #$(if (target-64bit?) "-race" "-short")) + ;; Test subdirectories are compiled from #:import-path. + #:test-subdirs #~(list "../../internal/..." "../../pkg/..." ))) (inputs - `(("golang.org/x/sys" ,go-golang-org-x-sys-for-esbuild))) + (list go-golang-org-x-sys-for-esbuild)) (home-page "https://esbuild.github.io/") (synopsis "Bundler and minifier tool for JavaScript and TypeScript") (description - "The esbuild tool provides a unified bundler, transpiler and -minifier. It packages up JavaScript and TypeScript code, along with JSON -and other data, for distribution on the web.") + "The esbuild tool provides a unified bundler, transpiler and minifier. +It packages up JavaScript and TypeScript code, along with JSON and other data, +for distribution on the web.") (license license:expat))) (define-public tinyproxy |