Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4e944c591dcd
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3d8d0f53ba6e
Choose a head ref
  • 1 commit
  • 5 files changed
  • 1 contributor

Commits on Apr 14, 2020

  1. nodePackages: fix build

    globin committed Apr 14, 2020
    Copy the full SHA
    3d8d0f5 View commit details
4 changes: 2 additions & 2 deletions pkgs/development/node-packages/composition-v10.nix
Original file line number Diff line number Diff line change
@@ -6,12 +6,12 @@

let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile jq;
inherit nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages-v10.nix {
inherit (pkgs) fetchurl fetchgit;
inherit nodeEnv;
}
}
4 changes: 2 additions & 2 deletions pkgs/development/node-packages/composition-v12.nix
Original file line number Diff line number Diff line change
@@ -6,12 +6,12 @@

let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile jq;
inherit nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages-v12.nix {
inherit (pkgs) fetchurl fetchgit;
inherit nodeEnv;
}
}
4 changes: 2 additions & 2 deletions pkgs/development/node-packages/composition-v13.nix
Original file line number Diff line number Diff line change
@@ -6,12 +6,12 @@

let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile jq;
inherit nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages-v13.nix {
inherit (pkgs) fetchurl fetchgit;
inherit nodeEnv;
}
}
12 changes: 4 additions & 8 deletions pkgs/development/node-packages/node-env.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file originates from node2nix

{stdenv, nodejs, python2, utillinux, libtool, runCommand, writeTextFile}:
{stdenv, nodejs, python2, utillinux, libtool, runCommand, writeTextFile, jq}:

let
python = if nodejs ? python then nodejs.python else python2;
@@ -324,7 +324,7 @@ let
''
# Pinpoint the versions of all dependencies to the ones that are actually being used
echo "pinpointing versions of dependencies..."
source $pinpointDependenciesScriptPath
source <(${jq}/bin/jq -r <$NIX_BUILD_TOP/.attrs.json '.pinpointDependenciesScript')
# Patch the shebangs of the bundled modules to prevent them from
# calling executables outside the Nix store as much as possible
@@ -408,15 +408,13 @@ let
compositionScript = composePackage args;
pinpointDependenciesScript = pinpointDependenciesOfPackage args;

passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];

installPhase = ''
# Create and enter a root node_modules/ folder
mkdir -p $out/lib/node_modules
cd $out/lib/node_modules
# Compose the package and all its dependencies
source $compositionScriptPath
source <(${jq}/bin/jq -r <$NIX_BUILD_TOP/.attrs.json '.compositionScript')
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
@@ -480,13 +478,11 @@ let
includeScript = includeDependencies { inherit dependencies; };
pinpointDependenciesScript = pinpointDependenciesOfPackage args;

passAsFile = [ "includeScript" "pinpointDependenciesScript" ];

installPhase = ''
mkdir -p $out/${packageName}
cd $out/${packageName}
source $includeScriptPath
source <(${jq}/bin/jq -r <$NIX_BUILD_TOP/.attrs.json '.includeScript')
# Create fake package.json to make the npm commands work properly
cp ${src}/package.json .
4 changes: 2 additions & 2 deletions pkgs/tools/networking/airfield/node.nix
Original file line number Diff line number Diff line change
@@ -6,12 +6,12 @@

let
nodeEnv = import ../../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile jq;
inherit nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl fetchgit;
inherit nodeEnv;
}
}