diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-06-12 16:07:34 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-06-12 16:07:34 +0200 |
commit | 7f5b750b401e98e9e2a346552aba5bd2e0a9203f (patch) | |
tree | 7321ec3b328282126a30792a80c8c8fa682e89e8 /src | |
parent | 186571965dccf57d15b9f37c1cca92a57187b7b3 (diff) |
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).
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/build.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index d5fe41d1b..bdec30151 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1950,7 +1950,7 @@ void DerivationGoal::startBuilder() } } - if (settings.preBuildHook != "") { + if (useChroot && settings.preBuildHook != "" && dynamic_cast<Derivation *>(drv.get())) { printMsg(lvlChatty, format("executing pre-build hook ‘%1%’") % settings.preBuildHook); auto args = useChroot ? Strings({drvPath, chrootRootDir}) : |