* [bug#63307] [PATCH] gnu: Add pnpm
@ 2023-05-05 14:03 Franz Geffke
2023-08-20 5:35 ` Hilton Chain via Guix-patches via
2024-02-20 17:11 ` Erik Eduardo
0 siblings, 2 replies; 3+ messages in thread
From: Franz Geffke @ 2023-05-05 14:03 UTC (permalink / raw)
To: 63307
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)))
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#63307] [PATCH] gnu: Add pnpm
2023-05-05 14:03 [bug#63307] [PATCH] gnu: Add pnpm Franz Geffke
@ 2023-08-20 5:35 ` Hilton Chain via Guix-patches via
2024-02-20 17:11 ` Erik Eduardo
1 sibling, 0 replies; 3+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-20 5:35 UTC (permalink / raw)
To: Franz Geffke; +Cc: 63307
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [bug#63307] [PATCH] gnu: Add pnpm
2023-05-05 14:03 [bug#63307] [PATCH] gnu: Add pnpm Franz Geffke
2023-08-20 5:35 ` Hilton Chain via Guix-patches via
@ 2024-02-20 17:11 ` Erik Eduardo
1 sibling, 0 replies; 3+ messages in thread
From: Erik Eduardo @ 2024-02-20 17:11 UTC (permalink / raw)
To: 63307
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-20 17:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-05 14:03 [bug#63307] [PATCH] gnu: Add pnpm Franz Geffke
2023-08-20 5:35 ` Hilton Chain via Guix-patches via
2024-02-20 17:11 ` Erik Eduardo
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.