diff options
Diffstat (limited to 'rodion')
-rw-r--r-- | rodion/packages/node.scm | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/rodion/packages/node.scm b/rodion/packages/node.scm new file mode 100644 index 0000000..77e051e --- /dev/null +++ b/rodion/packages/node.scm @@ -0,0 +1,44 @@ +(define-module (rodion packages node) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (gnu packages gcc) + #:use-module (gnu packages base) + #:use-module (gnu packages commencement) + #:use-module (nonguix build-system binary) + #:use-module (guix licenses)) + +(define-public node-fresh + (package + (name "node") + (version "20.11.1") + (source (origin + (method url-fetch) + (uri (string-append "https://nodejs.org/dist/v" version + "/node-v" version "-linux-x64.tar.xz")) + (sha256 + (base32 + "1gkgrz4vsps9idmb4kp7js6bbqrxkxlmf8maaqrv0wlnn14vbnnq")))) + (build-system binary-build-system) + (arguments + `(#:install-plan '(("bin" "bin") + ("include" "include") + ("lib" "lib") + ("share" "share")) + #:patchelf-plan `(("bin/node" ("gcc" "gcc-toolchain"))) + #:strip-binaries? #f + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-corepack + (lambda* (#:key outputs #:allow-other-keys) + ;; FIXME: Cannot install npm because installing npm with corepack causes segmentation fault + (invoke (string-append (assoc-ref outputs "out") "/bin/node") + (string-append (assoc-ref outputs "out") "/bin/corepack") + "enable" + "--install-directory" (string-append (assoc-ref outputs "out") "/bin"))))))) + (inputs `((,gcc "lib") + ,gcc-toolchain)) + (home-page "https://nodejs.org/") + (synopsis "nodejs") + (description + "Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.") + (license expat))) |