Author: eelco
Date: Wed Nov  3 22:37:00 2010
New Revision: 24592
URL: https://svn.nixos.org/websvn/nix/?rev=24592&sc=1

Log:
* 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.

Modified:
   nixpkgs/trunk/pkgs/build-support/buildenv/builder.pl
   nixpkgs/trunk/pkgs/build-support/buildenv/default.nix
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Modified: nixpkgs/trunk/pkgs/build-support/buildenv/builder.pl
==============================================================================
--- nixpkgs/trunk/pkgs/build-support/buildenv/builder.pl        Wed Nov  3 
22:20:05 2010        (r24591)
+++ nixpkgs/trunk/pkgs/build-support/buildenv/builder.pl        Wed Nov  3 
22:37:00 2010        (r24592)
@@ -10,7 +10,6 @@
 
 my $out = $ENV{"out"};
 
-
 my @pathsToLink = split ' ', $ENV{"pathsToLink"};
 
 sub isInPathsToLink {
@@ -153,7 +152,3 @@
 if ($manifest) {
     symlink($manifest, "$out/manifest") or die "cannot create manifest";
 }
-
-
-system("eval \"\$postBuild\"") == 0
-    or die "post-build hook failed";

Modified: nixpkgs/trunk/pkgs/build-support/buildenv/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/build-support/buildenv/default.nix       Wed Nov  3 
22:20:05 2010        (r24591)
+++ nixpkgs/trunk/pkgs/build-support/buildenv/default.nix       Wed Nov  3 
22:37:00 2010        (r24592)
@@ -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"
+  ''

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Wed Nov  3 22:20:05 
2010        (r24591)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Wed Nov  3 22:37:00 
2010        (r24592)
@@ -233,9 +233,8 @@
     theAttrSet = arg;
   };
 
-  buildEnvScript = ../build-support/buildenv/builder.pl;
   buildEnv = import ../build-support/buildenv {
-    inherit stdenv perl;
+    inherit runCommand perl;
   };
 
   dotnetenv = import ../build-support/dotnetenv {
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to