summaryrefslogtreecommitdiff
path: root/pkgs/development/node-packages/node-env.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/node-packages/node-env.nix')
-rw-r--r--pkgs/development/node-packages/node-env.nix13
1 files changed, 8 insertions, 5 deletions
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 <<EOF