mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
pnpm: init at 9.1.1
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
(cherry picked from commit 53af969d62
)
This commit is contained in:
parent
57321d2ed2
commit
8fe4a3a933
20
pkgs/development/tools/pnpm/default.nix
Normal file
20
pkgs/development/tools/pnpm/default.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ lib, callPackage }:
|
||||
let
|
||||
inherit (lib) mapAttrs' nameValuePair;
|
||||
|
||||
variants = {
|
||||
"8" = {
|
||||
version = "8.15.8";
|
||||
hash = "sha256-aR/hdu6pqKgN8g5JdvPftEoEhBzriFY4/iomF0+B5l4=";
|
||||
};
|
||||
"9" = {
|
||||
version = "9.1.1";
|
||||
hash = "sha256-lVHoA9y3oYOf31QWFTqEQGDHvOATIYzoI0EFMlBKwQs=";
|
||||
};
|
||||
};
|
||||
|
||||
callPnpm = variant: callPackage ./generic.nix {inherit (variant) version hash;};
|
||||
|
||||
mkPnpm = versionSuffix: variant: nameValuePair "pnpm_${versionSuffix}" (callPnpm variant);
|
||||
in
|
||||
mapAttrs' mkPnpm variants
|
50
pkgs/development/tools/pnpm/generic.nix
Normal file
50
pkgs/development/tools/pnpm/generic.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
nodejs,
|
||||
testers,
|
||||
withNode ? true,
|
||||
|
||||
version,
|
||||
hash,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "pnpm";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/pnpm/-/pnpm-${finalAttrs.version}.tgz";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
buildInputs = lib.optionals withNode [ nodejs ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -d $out/{bin,libexec}
|
||||
cp -R . $out/libexec/pnpm
|
||||
ln -s $out/libexec/pnpm/bin/pnpm.cjs $out/bin/pnpm
|
||||
ln -s $out/libexec/pnpm/bin/pnpx.cjs $out/bin/pnpx
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests.version = lib.optionalAttrs withNode (
|
||||
testers.testVersion { package = finalAttrs.finalPackage; }
|
||||
);
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast, disk space efficient package manager for JavaScript";
|
||||
homepage = "https://pnpm.io/";
|
||||
changelog = "https://github.com/pnpm/pnpm/releases/tag/v${finalAttrs.version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ Scrumplex ];
|
||||
platforms = platforms.all;
|
||||
mainProgram = "pnpm";
|
||||
};
|
||||
})
|
@ -11891,6 +11891,10 @@ with pkgs;
|
||||
|
||||
pngquant = callPackage ../tools/graphics/pngquant { };
|
||||
|
||||
inherit (callPackages ../development/tools/pnpm { })
|
||||
pnpm_8 pnpm_9;
|
||||
pnpm = pnpm_9;
|
||||
|
||||
po4a = perlPackages.Po4a;
|
||||
|
||||
poac = callPackage ../development/tools/poac {
|
||||
|
Loading…
Reference in New Issue
Block a user