diff options
-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]; } - |