diff --git a/pkgs/development/web/nodejs/v21.nix b/pkgs/development/web/nodejs/v21.nix new file mode 100644 index 00000000000000..bb90551030a6a4 --- /dev/null +++ b/pkgs/development/web/nodejs/v21.nix @@ -0,0 +1,25 @@ +{ callPackage, openssl, python3, enableNpm ? true }: + +let + buildNodejs = callPackage ./nodejs.nix { + inherit openssl; + python = python3; + }; + + gypPatches = callPackage ./gyp-patches.nix { } ++ [ + ./gyp-patches-pre-v22-import-sys.patch + ]; +in +buildNodejs { + inherit enableNpm; + version = "21.7.3"; + sha256 = "sha256-Zosm+xv8HP9gYiu889cVhD4W9QyPMOn2T7QUGBTXmiE="; + patches = [ + ./configure-emulator.patch + ./configure-armv6-vfpv2.patch + ./disable-darwin-v8-system-instrumentation-node19.patch + ./bypass-darwin-xcrun-node16.patch + ./node-npm-build-npm-package-logic.patch + ./use-correct-env-in-tests.patch + ] ++ gypPatches; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 39706f6511a2ee..b6fc904d378d50 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9501,6 +9501,10 @@ with pkgs; nodejs-slim_20 = callPackage ../development/web/nodejs/v20.nix { enableNpm = false; }; corepack_20 = hiPrio (callPackage ../development/web/nodejs/corepack.nix { nodejs = nodejs_20; }); + nodejs_21 = callPackage ../development/web/nodejs/v21.nix { }; + nodejs-slim_21 = callPackage ../development/web/nodejs/v21.nix { enableNpm = false; }; + corepack_21 = hiPrio (callPackage ../development/web/nodejs/corepack.nix { nodejs = nodejs_21; }); + nodejs_22 = callPackage ../development/web/nodejs/v22.nix { }; nodejs-slim_22 = callPackage ../development/web/nodejs/v22.nix { enableNpm = false; }; corepack_22 = hiPrio (callPackage ../development/web/nodejs/corepack.nix { nodejs = nodejs_22; });