diff --git a/pkgs/development/node-packages/default-v10.nix b/pkgs/development/node-packages/default-v10.nix index 9bdba59b5357..d7df19066bb3 100644 --- a/pkgs/development/node-packages/default-v10.nix +++ b/pkgs/development/node-packages/default-v10.nix @@ -5,4 +5,20 @@ let inherit pkgs system nodejs; }; in -nodePackages +nodePackages // { + + pnpm = nodePackages.pnpm.override { + nativeBuildInputs = [ pkgs.makeWrapper ]; + postInstall = let + pnpmLibPath = stdenv.lib.makeBinPath [ + nodejs.passthru.python + nodejs + ]; + in '' + for prog in $out/bin/*; do + wrapProgram "$prog" --prefix PATH : ${pnpmLibPath} + done + ''; + }; + +} diff --git a/pkgs/development/node-packages/node-packages-v10.json b/pkgs/development/node-packages/node-packages-v10.json index a298a6b95225..50cc105e7fff 100644 --- a/pkgs/development/node-packages/node-packages-v10.json +++ b/pkgs/development/node-packages/node-packages-v10.json @@ -2,4 +2,5 @@ "bower" , "coffee-script" , "grunt-cli" +, "pnpm" ] diff --git a/pkgs/development/node-packages/node-packages-v10.nix b/pkgs/development/node-packages/node-packages-v10.nix index 45b698320431..30b63e5ca4da 100644 --- a/pkgs/development/node-packages/node-packages-v10.nix +++ b/pkgs/development/node-packages/node-packages-v10.nix @@ -210,4 +210,21 @@ in production = true; bypassCache = true; }; + pnpm = nodeEnv.buildNodePackage { + name = "pnpm"; + packageName = "pnpm"; + version = "2.9.0"; + src = fetchurl { + url = "https://registry.npmjs.org/pnpm/-/pnpm-2.9.0.tgz"; + sha1 = "1c2f5ade46b87cc3b1f3b7c66eeb7b0f4df4d968"; + }; + buildInputs = globalBuildInputs; + meta = { + description = "Fast, disk space efficient package manager"; + homepage = https://pnpm.js.org/; + license = "MIT"; + }; + production = true; + bypassCache = true; + }; } \ No newline at end of file