summaryrefslogtreecommitdiff
path: root/px/packages/node.scm
diff options
context:
space:
mode:
authorFranz Geffke <m@f-a.nz>2025-03-31 15:47:17 +0100
committerFranz Geffke <m@f-a.nz>2025-03-31 15:47:17 +0100
commitcd69f234ba601ad75691a31f3ec5cf578d29205a (patch)
treefe62a7c5b74d88e1416fda44ea41bc4dcbdcd669 /px/packages/node.scm
parent22d50a67e35edcf4d36f8e50dcfe1455490773bf (diff)
px: yarn: Added
Diffstat (limited to 'px/packages/node.scm')
-rw-r--r--px/packages/node.scm39
1 files changed, 38 insertions, 1 deletions
diff --git a/px/packages/node.scm b/px/packages/node.scm
index 38ee299..143c98d 100644
--- a/px/packages/node.scm
+++ b/px/packages/node.scm
@@ -4,6 +4,7 @@
#:use-module (ice-9 match)
#:use-module (guix download)
#:use-module (guix build-system trivial)
+ #:use-module (guix build-system copy)
#:use-module (guix packages))
(define-public pnpm
@@ -68,4 +69,40 @@ store all files from all module directories on a disk")
(synopsis "Fast, disk space efficient package manager for nodejs")
(description "PNPM uses a content-addressable filesystem to
store all files from all module directories on a disk")
- (license license:expat))) \ No newline at end of file
+ (license license:expat)))
+
+(define-public yarn
+ (package
+ (name "yarn")
+ (version "1.22.22")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/yarnpkg/yarn/releases/download/v"
+ version "/yarn-v" version ".tar.gz"))
+ (sha256
+ (base32 "181nvynhhrbga3c209v8cd9psk6lqjkc1s9wyzy125lx35j889l8"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ '(("bin/" "bin/")
+ ("lib/" "lib/")
+ ("package.json" "lib/yarn/")
+ ("LICENSE" "share/doc/yarn/")
+ ("README.md" "share/doc/yarn/"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'make-executable
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+ (for-each
+ (lambda (file)
+ (chmod file #o755))
+ (find-files bin ".*"))))))))
+ (home-page "https://classic.yarnpkg.com")
+ (synopsis "Fast, reliable, and secure dependency management.")
+ (description "Yarn is a package manager for your code.
+It allows you to use and share (e.g. JavaScript) code with
+other developers from around the world. Yarn does this quickly,
+securely, and reliably so you don’t ever have to worry.")
+ (license license:expat)))