GNU bug report logs - #63307
[PATCH] gnu: Add pnpm

Previous Next

Package: guix-patches;

Reported by: Franz Geffke <franz <at> pantherx.org>

Date: Fri, 5 May 2023 14:04:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 63307 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#63307; Package guix-patches. (Fri, 05 May 2023 14:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franz Geffke <franz <at> pantherx.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 05 May 2023 14:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Franz Geffke <franz <at> pantherx.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add pnpm
Date: Fri, 5 May 2023 15:03:22 +0100
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)))




Information forwarded to guix-patches <at> gnu.org:
bug#63307; Package guix-patches. (Sun, 20 Aug 2023 05:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 63307 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Franz Geffke <franz <at> pantherx.org>
Cc: 63307 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add pnpm
Date: Sun, 20 Aug 2023 13:35:42 +0800
Hi Franz,

On Fri, 05 May 2023 22:03:22 +0800,
Franz Geffke wrote:
>
> 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

[1]: https://github.com/nodejs/corepack




Information forwarded to guix-patches <at> gnu.org:
bug#63307; Package guix-patches. (Tue, 20 Feb 2024 17:14:02 GMT) Full text and rfc822 format available.

Message #11 received at 63307 <at> debbugs.gnu.org (full text, mbox):

From: "Erik Eduardo" <eduarskate8 <at> gmail.com>
To: <63307 <at> debbugs.gnu.org>
Subject: [PATCH] gnu: Add pnpm
Date: Tue, 20 Feb 2024 17:11:37 +0000
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.




This bug report was last modified 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.