diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2026-07-12 00:44:14 +0200 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2026-08-27 10:59:19 +0900 |
| commit | 551902ee4d3134f9f7f05b30781bb3e9f5d1b152 (patch) | |
| tree | e6bb5c73b5a864954547f41da156fafc9df1cf24 /gnu | |
| parent | 6e9aa27f27aba549f3cf0f6f2746844280358984 (diff) | |
gnu: llhttp-bootstrap: Improve style.
* gnu/packages/node.scm (llhttp-bootstrap):
[arguments]: Improve style, use G-expressions.
[native-inputs]: Drop input labels.
Change-Id: I93af15f50f7b95eaf101dfa698370c7ed3ca2022
Signed-off-by: Jelle Licht <jlicht@fsfe.org>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/node.scm | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 998b723a812..8270c802b74 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm | |||
| @@ -724,7 +724,7 @@ parser definition into a C output.") | |||
| 724 | 724 | ||
| 725 | (define-public llhttp-bootstrap | 725 | (define-public llhttp-bootstrap |
| 726 | (package | 726 | (package |
| 727 | (name "llhttp") | 727 | (name "llhttp-bootstrap") |
| 728 | (version "9.4.2") | 728 | (version "9.4.2") |
| 729 | (source (origin | 729 | (source (origin |
| 730 | (method git-fetch) | 730 | (method git-fetch) |
| @@ -748,41 +748,40 @@ parser definition into a C output.") | |||
| 748 | #t)))) | 748 | #t)))) |
| 749 | (build-system gnu-build-system) | 749 | (build-system gnu-build-system) |
| 750 | (arguments | 750 | (arguments |
| 751 | `(#:tests? #f ; no tests | 751 | (list |
| 752 | #:make-flags (list (string-append "CLANG=" ,(cc-for-target)) | 752 | #:tests? #f ; no tests |
| 753 | (string-append "DESTDIR=" (assoc-ref %outputs "out")) | 753 | #:make-flags |
| 754 | "PREFIX=") | 754 | #~(list (string-append "CLANG=" #$(cc-for-target)) |
| 755 | #:phases | 755 | (string-append "DESTDIR=" #$output) |
| 756 | (modify-phases %standard-phases | 756 | "PREFIX=") |
| 757 | (replace 'configure | 757 | #:phases |
| 758 | (lambda* (#:key inputs native-inputs #:allow-other-keys) | 758 | #~(modify-phases %standard-phases |
| 759 | (let ((esbuild (search-input-file (or native-inputs inputs) | 759 | (replace 'configure |
| 760 | "/bin/esbuild"))) | 760 | (lambda* (#:key inputs native-inputs #:allow-other-keys) |
| 761 | (invoke esbuild | 761 | (let ((esbuild (search-input-file (or native-inputs inputs) |
| 762 | "--platform=node" | 762 | "/bin/esbuild"))) |
| 763 | "--target=node10" | 763 | (invoke esbuild |
| 764 | "--outfile=bin/generate.js" | 764 | "--platform=node" |
| 765 | "--bundle" "bin/generate.ts")))) | 765 | "--target=node10" |
| 766 | (add-before 'install 'create-install-directories | 766 | "--outfile=bin/generate.js" |
| 767 | (lambda* (#:key outputs #:allow-other-keys) | 767 | "--bundle" |
| 768 | (let ((out (assoc-ref outputs "out"))) | 768 | "bin/generate.ts")))) |
| 769 | (for-each (lambda (dir) | 769 | (add-before 'install 'create-install-directories |
| 770 | (mkdir-p (string-append out dir))) | 770 | (lambda _ |
| 771 | (list "/lib" "/include" "/src")) | 771 | (mkdir #$output) |
| 772 | #t))) | 772 | (with-directory-excursion #$output |
| 773 | (add-after 'install 'install-src | 773 | (for-each mkdir (list "lib" "include" "src"))))) |
| 774 | (lambda* (#:key outputs #:allow-other-keys) | 774 | (add-after 'install 'install-src |
| 775 | (let* ((out (assoc-ref outputs "out")) | 775 | (lambda _ |
| 776 | (src-dir (string-append out "/src"))) | 776 | (let ((src-dir (string-append #$output "/src"))) |
| 777 | (install-file "build/c/llhttp.c" src-dir) | 777 | (install-file "build/c/llhttp.c" src-dir) |
| 778 | (install-file "src/native/api.c" src-dir) | 778 | (install-file "src/native/api.c" src-dir) |
| 779 | (install-file "src/native/http.c" src-dir) | 779 | (install-file "src/native/http.c" src-dir))))))) |
| 780 | #t)))))) | ||
| 781 | (native-inputs | 780 | (native-inputs |
| 782 | `(("esbuild" ,esbuild) | 781 | (list esbuild |
| 783 | ("node" ,node-bootstrap) | 782 | node-bootstrap |
| 784 | ("node-semver" ,node-semver-bootstrap) | 783 | node-llparse-bootstrap |
| 785 | ("node-llparse-bootstrap" ,node-llparse-bootstrap))) | 784 | node-semver-bootstrap)) |
| 786 | (home-page "https://github.com/nodejs/llhttp") | 785 | (home-page "https://github.com/nodejs/llhttp") |
| 787 | (properties '((hidden? . #t))) | 786 | (properties '((hidden? . #t))) |
| 788 | (synopsis "Parser for HTTP messages") | 787 | (synopsis "Parser for HTTP messages") |
