about summary refs log tree commit diff
path: root/pkgs/development/web/nodejs
diff options
context:
space:
mode:
authorFabián Heredia Montiel <fabianhjr@protonmail.com>2023-09-20 15:08:16 -0600
committerFabián Heredia Montiel <fabianhjr@protonmail.com>2023-09-20 15:08:16 -0600
commitb2f85dbf28290f7f11ef31d04019da1df5ebde5d (patch)
treeaed61634f7c1ca38fc7fe42113ac3187faf16508 /pkgs/development/web/nodejs
parent8d8feb905eb2c52c55e0dda9c1c27e50b2169251 (diff)
parente8dd05c4c439c1ddba7221d9a45245d76ae24372 (diff)
downloadnixlib-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar
nixlib-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar.gz
nixlib-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar.bz2
nixlib-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar.lz
nixlib-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar.xz
nixlib-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar.zst
nixlib-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.zip
Merge remote-tracking branch 'origin/master' into staging-next
Diffstat (limited to 'pkgs/development/web/nodejs')
-rw-r--r--pkgs/development/web/nodejs/corepack.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/development/web/nodejs/corepack.nix b/pkgs/development/web/nodejs/corepack.nix
new file mode 100644
index 000000000000..c83d3f1645fc
--- /dev/null
+++ b/pkgs/development/web/nodejs/corepack.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, nodejs }:
+
+stdenv.mkDerivation {
+  pname = "corepack-nodejs";
+  inherit (nodejs) version;
+
+  nativeBuildInputs = [ nodejs ];
+
+  dontUnpack = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    corepack enable --install-directory $out/bin
+    # Enabling npm caused some crashes - leaving out for now
+    # corepack enable --install-directory $out/bin npm
+  '';
+
+  meta = {
+    description = "Wrappers for npm, pnpm and Yarn via Node.js Corepack";
+    homepage = "https://nodejs.org/api/corepack.html";
+    changelog = "https://github.com/nodejs/node/releases/tag/v${nodejs.version}";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ wmertens ];
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+}