sharlatan pushed a commit to branch go-team
in repository guix.
commit 469d57dcba99aac6239a90d2b9a8f18294eb1cad
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Sun Dec 29 12:29:15 2024 +0000
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
---
gnu/packages/web.scm | 39 +++++++++++++--------------------------
1 file changed, 13 insertions(+), 26 deletions(-)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index ceb700f9ad..188723d6b8 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -1956,38 +1956,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