Skip to content

Commit

Permalink
Merge pull request #33 from abbradar/master
Browse files Browse the repository at this point in the history
Use nodejs's version of Python
  • Loading branch information
svanderburg authored Jan 4, 2017
2 parents aabfd15 + f4b250a commit e9e641f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions nix/node-env.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# This file originates from node2nix

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

let
inherit (nodejs) python;

# Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
tarWrapper = runCommand "tarWrapper" {} ''
mkdir -p $out/bin
Expand Down Expand Up @@ -171,7 +173,7 @@ let

stdenv.lib.makeOverridable stdenv.mkDerivation (builtins.removeAttrs args [ "dependencies" ] // {
name = "node-${name}-${version}";
buildInputs = [ tarWrapper python2 nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
buildInputs = [ tarWrapper python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
dontStrip = args.dontStrip or true; # Striping may fail a build for some package deployments

inherit dontNpmInstall preRebuild;
Expand Down Expand Up @@ -249,7 +251,7 @@ let
nodeDependencies = stdenv.mkDerivation {
name = "node-dependencies-${name}-${version}";

buildInputs = [ tarWrapper python2 nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
buildInputs = [ tarWrapper python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];

includeScript = includeDependencies { inherit dependencies; };
passAsFile = [ "includeScript" ];
Expand Down Expand Up @@ -288,7 +290,7 @@ let
stdenv.lib.makeOverridable stdenv.mkDerivation {
name = "node-shell-${name}-${version}";

buildInputs = [ python2 nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
buildCommand = ''
mkdir -p $out/bin
cat > $out/bin/shell <<EOF
Expand Down

0 comments on commit e9e641f

Please sign in to comment.