From 0ae591d1da1a376002508452d34b7e80e6b1400c Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Tue, 25 Feb 2025 00:20:22 -0500 Subject: nodePackages: fix generate.sh --- pkgs/development/node-packages/composition.nix | 27 +- pkgs/development/node-packages/node-env.nix | 13 +- pkgs/development/node-packages/node-packages.json | 1 - pkgs/development/node-packages/node-packages.nix | 19500 +++++++------------- 4 files changed, 7035 insertions(+), 12506 deletions(-) diff --git a/pkgs/development/node-packages/composition.nix b/pkgs/development/node-packages/composition.nix index 659c43a1feec..0d4da1c6fc7a 100644 --- a/pkgs/development/node-packages/composition.nix +++ b/pkgs/development/node-packages/composition.nix @@ -1,34 +1,17 @@ # This file has been generated by node2nix 1.11.1. Do not edit! -{ - pkgs ? import { +{pkgs ? import { inherit system; - }, - system ? builtins.currentSystem, - nodejs ? pkgs."nodejs_22", -}: + }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_22"}: let nodeEnv = import ./node-env.nix { - inherit (pkgs) - stdenv - lib - python2 - runCommand - writeTextFile - writeShellScript - ; + inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; inherit pkgs nodejs; - libtool = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; + libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null; }; in import ./node-packages.nix { - inherit (pkgs) - fetchurl - nix-gitignore - stdenv - lib - fetchgit - ; + inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit; inherit nodeEnv; } diff --git a/pkgs/development/node-packages/node-env.nix b/pkgs/development/node-packages/node-env.nix index 4123ca029664..bc1e36628ac8 100644 --- a/pkgs/development/node-packages/node-env.nix +++ b/pkgs/development/node-packages/node-env.nix @@ -3,6 +3,9 @@ {lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile, writeShellScript}: let + # Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master + utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux; + python = if nodejs ? python then nodejs.python else python2; # Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise @@ -496,8 +499,8 @@ let stdenv.mkDerivation ({ name = "${name}${if version == null then "" else "-${version}"}"; buildInputs = [ tarWrapper python nodejs ] - ++ lib.optional (stdenv.hostPlatform.isLinux) pkgs.util-linux - ++ lib.optional (stdenv.hostPlatform.isDarwin) libtool + ++ lib.optional (stdenv.isLinux) utillinux + ++ lib.optional (stdenv.isDarwin) libtool ++ buildInputs; inherit nodejs; @@ -588,8 +591,8 @@ let name = "node-dependencies-${name}${if version == null then "" else "-${version}"}"; buildInputs = [ tarWrapper python nodejs ] - ++ lib.optional (stdenv.hostPlatform.isLinux) pkgs.util-linux - ++ lib.optional (stdenv.hostPlatform.isDarwin) libtool + ++ lib.optional (stdenv.isLinux) utillinux + ++ lib.optional (stdenv.isDarwin) libtool ++ buildInputs; inherit dontStrip; # Stripping may fail a build for some package deployments @@ -659,7 +662,7 @@ let stdenv.mkDerivation ({ name = "node-shell-${name}${if version == null then "" else "-${version}"}"; - buildInputs = [ python nodejs ] ++ lib.optional (stdenv.hostPlatform.isLinux) pkgs.util-linux ++ buildInputs; + buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs; buildCommand = '' mkdir -p $out/bin cat > $out/bin/shell <