Skip to content

Commit 7f5b750

Browse files
committedJun 12, 2017
Don't run pre-build-hook if we don't have a derivation
This fixes a build failure on OS X when using Hydra or Nix 1.12's build-remote (since they don't copy the derivation to the build machine).
1 parent 1865719 commit 7f5b750

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/libstore/build.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,7 @@ void DerivationGoal::startBuilder()
19501950
}
19511951
}
19521952

1953-
if (settings.preBuildHook != "") {
1953+
if (useChroot && settings.preBuildHook != "" && dynamic_cast<Derivation *>(drv.get())) {
19541954
printMsg(lvlChatty, format("executing pre-build hook ‘%1%’")
19551955
% settings.preBuildHook);
19561956
auto args = useChroot ? Strings({drvPath, chrootRootDir}) :

0 commit comments

Comments
 (0)