summary refs log tree commit diff
path: root/pkgs/development/web
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
parent8d8feb905eb2c52c55e0dda9c1c27e50b2169251 (diff)
parente8dd05c4c439c1ddba7221d9a45245d76ae24372 (diff)
downloadnixpkgs-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar
nixpkgs-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar.gz
nixpkgs-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar.bz2
nixpkgs-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar.lz
nixpkgs-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar.xz
nixpkgs-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.tar.zst
nixpkgs-b2f85dbf28290f7f11ef31d04019da1df5ebde5d.zip
Merge remote-tracking branch 'origin/master' into staging-next
Diffstat (limited to 'pkgs/development/web')
-rw-r--r--pkgs/development/web/deno/default.nix1
-rw-r--r--pkgs/development/web/nodejs/corepack.nix26
2 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix
index 85439eec63e..f068c3e8d5f 100644
--- a/pkgs/development/web/deno/default.nix
+++ b/pkgs/development/web/deno/default.nix
@@ -80,6 +80,7 @@ rustPlatform.buildRustPackage rec {
       bash or python.
     '';
     license = licenses.mit;
+    mainProgram = "deno";
     maintainers = with maintainers; [ jk ];
     platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
   };
diff --git a/pkgs/development/web/nodejs/corepack.nix b/pkgs/development/web/nodejs/corepack.nix
new file mode 100644
index 00000000000..c83d3f1645f
--- /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;
+  };
+}