]> infiniteadaptability.org Git - channel/commitdiff
packages: add pnpm master
authorAlexander Joss <[email protected]>
Thu, 22 Jan 2026 00:19:27 +0000 (16:19 -0800)
committerAlexander Joss <[email protected]>
Thu, 22 Jan 2026 00:24:09 +0000 (16:24 -0800)
infiniteadaptability/packages/pnpm.scm [new file with mode: 0644]

diff --git a/infiniteadaptability/packages/pnpm.scm b/infiniteadaptability/packages/pnpm.scm
new file mode 100644 (file)
index 0000000..517cc89
--- /dev/null
@@ -0,0 +1,54 @@
+(define-module (infiniteadaptability packages pnpm)
+  #:use-module (gnu packages)
+  #:use-module (guix download)
+  #:use-module (guix gexp)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (nonguix build-system binary)
+  #:export (pnpm))
+
+(define pnpm
+  (package
+    (name "pnpm")
+    (version "9.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/pnpm/pnpm/releases/download/v"
+                           version "/pnpm-linuxstatic-x64"))
+       (sha256
+        (base32 "195dk6qcna0dz7n2xvdbra563glk1bng30krxkxcbpxm9swhs5c4"))))
+    (supported-systems '("x86_64-linux"))
+    (build-system binary-build-system)
+    (arguments
+     (list
+      #:validate-runpath? #t
+      #:strip-binaries? #f
+      #:install-plan
+      #~'(("pnpm-linuxstatic-x64" "bin/pnpm"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'chmod
+            (lambda _
+              (chmod "pnpm-linuxstatic-x64" #o555))))))
+    (synopsis "Fast, disk space efficient package manager.")
+    (description
+     "Fast, disk space efficient package manager:
+
+    Fast. Up to 2x faster than the alternatives (see benchmark).
+    Efficient. Files inside node_modules are linked from a single content-addressable storage.
+    Great for monorepos.
+    Strict. A package can access only dependencies that are specified in its package.json.
+    Deterministic. Has a lockfile called pnpm-lock.yaml.
+    Works as a Node.js version manager. See pnpm env use.
+    Works everywhere. Supports Windows, Linux, and macOS.
+    Battle-tested. Used in production by teams of all sizes since 2016.
+    See the full feature comparison with npm and Yarn.
+
+To quote the Rush team:
+
+    Microsoft uses pnpm in Rush repos with hundreds of projects and hundreds of PRs per day, and we’ve found it to be very fast and reliable.
+")
+    (license expat)
+    (home-page "https://pnpm.io")))
+