* Support a post-install hook.

svn path=/nixpkgs/trunk/; revision=14142
This commit is contained in:
Eelco Dolstra 2009-02-20 15:40:11 +00:00
parent eb28d380c3
commit 2d89fb4fee
2 changed files with 9 additions and 3 deletions

View File

@ -165,3 +165,7 @@ my $manifest = $ENV{"manifest"};
if ($manifest ne "") {
symlink($manifest, "$out/manifest") or die "cannot create manifest";
}
system("eval \"\$postBuild\"") == 0
or die "post-build hook failed";

View File

@ -20,11 +20,13 @@
# symlink (e.g., ["/bin"]). Any file not inside any of the
# directories in the list is not symlinked.
pathsToLink ? ["/"]
, # Shell command to run after building the symlink tree.
postBuild ? ""
}:
stdenv.mkDerivation {
inherit name manifest paths ignoreCollisions pathsToLink;
realBuilder = perl + "/bin/perl";
inherit name manifest paths ignoreCollisions pathsToLink postBuild;
realBuilder = "${perl}/bin/perl";
args = ["-w" ./builder.pl];
}