mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-28 14:01:29 -05:00
gnu: Add node-llparse-frontend-bootstrap.
* gnu/packages/node.scm (node-llparse-frontend-bootstrap): New variable.
This commit is contained in:
parent
6b930e5242
commit
82e7f7c029
1 changed files with 56 additions and 0 deletions
|
@ -398,6 +398,62 @@ (define-public node-llparse-builder-bootstrap
|
||||||
(description "This package builds graphs for consumption by llparse.")
|
(description "This package builds graphs for consumption by llparse.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define-public node-llparse-frontend-bootstrap
|
||||||
|
(package
|
||||||
|
(name "node-llparse-frontend")
|
||||||
|
(version "3.0.0")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/indutny/llparse-frontend.git")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32 "1rm9g4ifyip30svm5cgnf0gx7d45jgh4mpf2hkd092xhngmfvicc"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
'(begin
|
||||||
|
;; Fix imports for esbuild.
|
||||||
|
;; https://github.com/evanw/esbuild/issues/477
|
||||||
|
(substitute* '("src/frontend.ts"
|
||||||
|
"src/code/field-value.ts"
|
||||||
|
"src/container/index.ts"
|
||||||
|
"src/container/wrap.ts"
|
||||||
|
"src/node/sequence.ts"
|
||||||
|
"src/node/single.ts"
|
||||||
|
"src/node/table-lookup.ts"
|
||||||
|
"src/trie/index.ts")
|
||||||
|
(("\\* as assert") "assert")
|
||||||
|
(("\\* as debugAPI") "debugAPI"))
|
||||||
|
#t))))
|
||||||
|
(build-system node-build-system)
|
||||||
|
(arguments
|
||||||
|
`(#:node ,node-bootstrap
|
||||||
|
#:tests? #f
|
||||||
|
#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(delete 'configure)
|
||||||
|
(replace 'build
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((esbuild (string-append (assoc-ref inputs "esbuild")
|
||||||
|
"/bin/esbuild")))
|
||||||
|
(invoke esbuild
|
||||||
|
"--platform=node"
|
||||||
|
"--outfile=lib/frontend.js"
|
||||||
|
"--bundle"
|
||||||
|
"src/frontend.ts")))))))
|
||||||
|
(inputs
|
||||||
|
`(("node-debug" ,node-debug-bootstrap)
|
||||||
|
("node-llparse-builder" ,node-llparse-builder-bootstrap)))
|
||||||
|
(native-inputs
|
||||||
|
`(("esbuild" ,esbuild)))
|
||||||
|
(home-page "https://github.com/indutny/llparse-frontend#readme")
|
||||||
|
(properties '((hidden? . #t)))
|
||||||
|
(synopsis "Frontend for the llparse compiler")
|
||||||
|
(description "This package is a frontend for the llparse compiler.")
|
||||||
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public libnode
|
(define-public libnode
|
||||||
(package/inherit node
|
(package/inherit node
|
||||||
(name "libnode")
|
(name "libnode")
|
||||||
|
|
Loading…
Reference in a new issue