From 943c2eb1b20e5a78819ea2d0de973f94b9585d67 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 23 Apr 2022 04:20:00 +0000 Subject: [PATCH] nodejs-18_x: init at 18.0.0 https://github.com/nodejs/node/releases/tag/v18.0.0 --- pkgs/development/web/nodejs/nodejs.nix | 2 +- pkgs/development/web/nodejs/v18.nix | 15 +++++++++++++++ pkgs/top-level/all-packages.nix | 9 ++++++--- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/web/nodejs/v18.nix diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 317de55ada56..7f8178838677 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -136,7 +136,7 @@ let ${optionalString (enableNpm && stdenv.hostPlatform == stdenv.buildPlatform) '' mkdir -p $out/share/bash-completion/completions/ - $out/bin/npm completion > $out/share/bash-completion/completions/npm + $out/bin/npm completion > $out/share/bash-completion/completions/npm || : for dir in "$out/lib/node_modules/npm/man/"*; do mkdir -p $out/share/man/$(basename "$dir") for page in "$dir"/*; do diff --git a/pkgs/development/web/nodejs/v18.nix b/pkgs/development/web/nodejs/v18.nix new file mode 100644 index 000000000000..562989d2fd31 --- /dev/null +++ b/pkgs/development/web/nodejs/v18.nix @@ -0,0 +1,15 @@ +{ callPackage, python3, enableNpm ? true }: + +let + buildNodejs = callPackage ./nodejs.nix { + python = python3; + }; +in +buildNodejs { + inherit enableNpm; + version = "18.0.0"; + sha256 = "sha256-NE0OZUC1JMaal5/1w+eM2nJU/XLANpmSa+sLhVi4znU="; + patches = [ + ./disable-darwin-v8-system-instrumentation.patch + ]; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c93ca619777d..866f6b2011b4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7757,10 +7757,13 @@ with pkgs; nodejs-slim-17_x = callPackage ../development/web/nodejs/v17.nix { enableNpm = false; }; + nodejs-18_x = callPackage ../development/web/nodejs/v18.nix { }; + nodejs-slim-18_x = callPackage ../development/web/nodejs/v18.nix { + enableNpm = false; + }; # Update this when adding the newest nodejs major version! - # Do not set to nodejs-17_x because it requires 10.13 SDK on Darwin - nodejs_latest = nodejs-16_x; - nodejs-slim_latest = nodejs-slim-16_x; + nodejs_latest = nodejs-18_x; + nodejs-slim_latest = nodejs-slim-18_x; nodePackages_latest = dontRecurseIntoAttrs nodejs_latest.pkgs;