Commit b013b3ee authored by Raito Bezarius's avatar Raito Bezarius
Browse files

nodejs_16: drop

Security support EOLed 1 month ago.
parent 2912f7ec
Loading
Loading
Loading
Loading
+0 −35
Original line number Diff line number Diff line
{ callPackage, lib, overrideCC, pkgs, buildPackages, openssl, python3, fetchpatch, enableNpm ? true }:

let
  # Clang 16+ cannot build Node v14 due to -Wenum-constexpr-conversion errors.
  # Use an older version of clang with the current libc++ for compatibility (e.g., with icu).
  ensureCompatibleCC = packages:
    if packages.stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion packages.stdenv.cc.cc) "16"
      then overrideCC packages.llvmPackages_15.stdenv (packages.llvmPackages_15.stdenv.cc.override {
        inherit (packages.llvmPackages) libcxx;
        extraPackages = [ packages.llvmPackages.libcxxabi ];
      })
      else packages.stdenv;

  buildNodejs = callPackage ./nodejs.nix {
    inherit openssl;
    stdenv = ensureCompatibleCC pkgs;
    buildPackages = buildPackages // { stdenv = ensureCompatibleCC buildPackages; };
    python = python3;
  };

  npmPatches = callPackage ./npm-patches.nix { };
in
  buildNodejs {
    inherit enableNpm;
    # If you do upgrade here, please update in pkgs/top-level/release.nix
    # the permitted insecure version to ensure it gets cached for our users
    # and backport this to stable release (23.05).
    version = "16.20.2";
    sha256 = "sha256-V28aA8RV5JGo0TK1h+trO4RlH8iXS7NjhDPdRNIsj0k=";
    patches = [
      ./disable-darwin-v8-system-instrumentation.patch
      ./bypass-darwin-xcrun-node16.patch
      ./node-npm-build-npm-package-logic-node16.patch
    ] ++ npmPatches;
  }
+2 −0
Original line number Diff line number Diff line
@@ -627,8 +627,10 @@ mapAliases ({
  nodejs-slim_14 = throw "nodejs-slim_14 has been removed as it is EOL."; # Added 2023-10-30
  nodejs-14_x = nodejs_14; # Added 2022-11-06
  nodejs-slim-14_x = nodejs-slim_14; # Added 2022-11-06
  nodejs_16 = throw "nodejs_16 has been removed as it is EOL."; # Added 2023-10-30
  nodejs-16_x = nodejs_16; # Added 2022-11-06
  nodejs-16_x-openssl_1_1 = throw "nodejs-16_x-openssl_1_1 has been removed."; # Added 2023-02-04
  nodejs-slim_16 = throw "nodejs-slim_16 has been removed as it is EOL."; # Added 2022-11-06
  nodejs-slim-16_x = nodejs-slim_16; # Added 2022-11-06
  nodejs-18_x = nodejs_18; # Added 2022-11-06
  nodejs-slim-18_x = nodejs-slim_18; # Added 2022-11-06
+0 −3
Original line number Diff line number Diff line
@@ -10309,9 +10309,6 @@ with pkgs;
  nodejs-slim = nodejs-slim_18;
  corepack = hiPrio corepack_18;
  nodejs_16 = callPackage ../development/web/nodejs/v16.nix { };
  nodejs-slim_16 = callPackage ../development/web/nodejs/v16.nix { enableNpm = false; };
  nodejs_18 = callPackage ../development/web/nodejs/v18.nix { };
  nodejs-slim_18 = callPackage ../development/web/nodejs/v18.nix { enableNpm = false; };
  corepack_18 = hiPrio (callPackage ../development/web/nodejs/corepack.nix { nodejs = nodejs_18; });