From a2102af6dfa3a5ab34a6bfcd00f8534b515d0b1b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 3 Nov 2010 22:37:00 +0000 Subject: [PATCH] * buildEnv: use $SHELL (i.e. bash) rather than /bin/sh. This allows NixOS VM tests to be built on Ubuntu, where /bin/sh is dash rather than bash. svn path=/nixpkgs/trunk/; revision=24592 --- pkgs/build-support/buildenv/builder.pl | 5 ----- pkgs/build-support/buildenv/default.nix | 13 +++++++------ pkgs/top-level/all-packages.nix | 3 +-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/pkgs/build-support/buildenv/builder.pl b/pkgs/build-support/buildenv/builder.pl index cdd65cbc523..71502c9f668 100755 --- a/pkgs/build-support/buildenv/builder.pl +++ b/pkgs/build-support/buildenv/builder.pl @@ -10,7 +10,6 @@ STDOUT->autoflush(1); my $out = $ENV{"out"}; - my @pathsToLink = split ' ', $ENV{"pathsToLink"}; sub isInPathsToLink { @@ -153,7 +152,3 @@ my $manifest = $ENV{"manifest"}; if ($manifest) { symlink($manifest, "$out/manifest") or die "cannot create manifest"; } - - -system("eval \"\$postBuild\"") == 0 - or die "post-build hook failed"; diff --git a/pkgs/build-support/buildenv/default.nix b/pkgs/build-support/buildenv/default.nix index abe2f37ec66..1bfada4fb62 100644 --- a/pkgs/build-support/buildenv/default.nix +++ b/pkgs/build-support/buildenv/default.nix @@ -2,7 +2,7 @@ # a fork of the buildEnv in the Nix distribution. Most changes should # eventually be merged back into the Nix distribution. -{stdenv, perl}: +{ perl, runCommand }: { name @@ -25,8 +25,9 @@ postBuild ? "" }: -stdenv.mkDerivation { - inherit name manifest paths ignoreCollisions pathsToLink postBuild; - realBuilder = "${perl}/bin/perl"; - args = ["-w" ./builder.pl]; -} +runCommand name + { inherit manifest paths ignoreCollisions pathsToLink postBuild; } + '' + ${perl}/bin/perl -w ${./builder.pl} + eval "$postBuild" + '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1021d65ddaa..df199ae36ea 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -233,9 +233,8 @@ let theAttrSet = arg; }; - buildEnvScript = ../build-support/buildenv/builder.pl; buildEnv = import ../build-support/buildenv { - inherit stdenv perl; + inherit runCommand perl; }; dotnetenv = import ../build-support/dotnetenv {