diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-02-20 15:40:11 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-02-20 15:40:11 +0000 |
commit | 2d89fb4fee9e41c2aa6b8871db59f3cda60254c5 (patch) | |
tree | 27479b0a647b55001e5108fc74cee91f534b7502 | |
parent | eb28d380c3160392c81a88937195eb72186d7c08 (diff) |
* Support a post-install hook.
svn path=/nixpkgs/trunk/; revision=14142
-rwxr-xr-x | pkgs/build-support/buildenv/builder.pl | 4 | ||||
-rw-r--r-- | pkgs/build-support/buildenv/default.nix | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/build-support/buildenv/builder.pl b/pkgs/build-support/buildenv/builder.pl index eb8490080558d..2da4311b38871 100755 --- a/pkgs/build-support/buildenv/builder.pl +++ b/pkgs/build-support/buildenv/builder.pl @@ -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"; diff --git a/pkgs/build-support/buildenv/default.nix b/pkgs/build-support/buildenv/default.nix index 95f5f2304c01f..abe2f37ec6604 100644 --- a/pkgs/build-support/buildenv/default.nix +++ b/pkgs/build-support/buildenv/default.nix @@ -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]; } - |