[PATCH] gnu: Add pnpm

  • Open
  • quality assurance status badge
Details
3 participants
  • Erik Eduardo
  • Franz Geffke
  • Hilton Chain
Owner
unassigned
Submitted by
Franz Geffke
Severity
normal
F
F
Franz Geffke wrote on 5 May 2023 16:03
(address . guix-patches@gnu.org)
8fce37f3-cb14-d7f9-d728-b1415fa4d82f@pantherx.org
Toggle diff (53 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 991113c05b..b32e68b415 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -29,7 +29,9 @@ (define-module (gnu packages node-xyz)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix git-download)
- #:use-module (guix build-system node))
+ #:use-module (guix build-system node)
+ #:use-module (guix build-system trivial)
+ #:use-module (ice-9 match))

(define-public node-acorn
(package
@@ -1546,3 +1548,37 @@ (define-public node-yazl
@item Prefer to open input files one at a time than all at once.
@end enumerate")
(license license:expat)))
+
+(define-public pnpm
+ (package
+ (name "pnpm")
+ (version "7.32.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/pnpm/pnpm/releases/download/v"
+ version "/pnpm-linuxstatic-"
+ (match (or (%current-system) (%current-target-system))
+ ("x86_64-linux" "x64")
+ ("aarch64-linux" "arm64"))))
+ (sha256
+ (base32
+ "1k3n24ink74ajs8nd0p6y6238vi41n5bvrk8clnydgwg11ax1zx0"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules ((guix build utils)))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (bin (string-append %output "/bin"))
+ (exe (string-append bin "/pnpm")))
+ (mkdir-p bin)
+ (copy-file source exe)
+ (chmod exe #o755)))))
+ (home-page "https://pnpm.io")
+ (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)))
H
H
Hilton Chain wrote on 20 Aug 2023 07:35
(name . Franz Geffke)(address . franz@pantherx.org)(address . 63307@debbugs.gnu.org)
87bkf2s2c1.wl-hako@ultrarare.space
Hi Franz,

On Fri, 05 May 2023 22:03:22 +0800,
Franz Geffke wrote:
Toggle quote (57 lines)
>
> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
> index 991113c05b..b32e68b415 100644
> --- a/gnu/packages/node-xyz.scm
> +++ b/gnu/packages/node-xyz.scm
> @@ -29,7 +29,9 @@ (define-module (gnu packages node-xyz)
> #:use-module (guix gexp)
> #:use-module (guix packages)
> #:use-module (guix git-download)
> - #:use-module (guix build-system node))
> + #:use-module (guix build-system node)
> + #:use-module (guix build-system trivial)
> + #:use-module (ice-9 match))
>
> (define-public node-acorn
> (package
> @@ -1546,3 +1548,37 @@ (define-public node-yazl
> @item Prefer to open input files one at a time than all at once.
> @end enumerate")
> (license license:expat)))
> +
> +(define-public pnpm
> + (package
> + (name "pnpm")
> + (version "7.32.2")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/pnpm/pnpm/releases/download/v"
> + version "/pnpm-linuxstatic-"
> + (match (or (%current-system) (%current-target-system))
> + ("x86_64-linux" "x64")
> + ("aarch64-linux" "arm64"))))
> + (sha256
> + (base32
> + "1k3n24ink74ajs8nd0p6y6238vi41n5bvrk8clnydgwg11ax1zx0"))))
> + (build-system trivial-build-system)
> + (arguments
> + `(#:modules ((guix build utils))
> + #:builder
> + (begin
> + (use-modules ((guix build utils)))
> + (let* ((source (assoc-ref %build-inputs "source"))
> + (bin (string-append %output "/bin"))
> + (exe (string-append bin "/pnpm")))
> + (mkdir-p bin)
> + (copy-file source exe)
> + (chmod exe #o755)))))
> + (home-page "https://pnpm.io")
> + (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)))
>
>

Binary packages won't be accpeted, would you like to try building pnpm
from source? Or this issue should be closed.

And in case you don't know, the current node package is built with
corepack [1] support, pnpm is included in it:
$ guix shell node -- corepack pnpm --help

Thanks

E
E
Erik Eduardo wrote on 20 Feb 18:11 +0100
[PATCH] gnu: Add pnpm
(address . 63307@debbugs.gnu.org)
CZA2K6T2SOJO.5R1EYI9Y8AMH@medianoche
To install pnpm is needed pnpm, how guix would deal with this?

More information about building can be found in CONTRIBUTING.md
on the root of the repository.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 63307@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 63307
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch