diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-12 17:08:52 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-12 17:08:52 +0000 |
commit | f7099965bfa1ec00cce28f6ed0d5daf3bc093759 (patch) | |
tree | 1aa1d627daacc1b4f1bf339b4cbf23951130ca0e /src/libstore | |
parent | 5a97621d6deebaaef24c1523c42647bfa43b01f6 (diff) |
Change .cc files to use split build headers
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build/derivation-goal.cc | 17 | ||||
-rw-r--r-- | src/libstore/build/goal.cc | 3 | ||||
-rw-r--r-- | src/libstore/build/hook-instance.cc | 3 | ||||
-rw-r--r-- | src/libstore/build/local-store-build.cc | 5 | ||||
-rw-r--r-- | src/libstore/build/substitution-goal.cc | 3 | ||||
-rw-r--r-- | src/libstore/build/worker.cc | 6 |
6 files changed, 31 insertions, 6 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index bb8921759..241e52116 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -1,4 +1,6 @@ -#include "build.hh" +#include "derivation-goal.hh" +#include "hook-instance.hh" +#include "worker.hh" #include "builtins.hh" #include "builtins/buildenv.hh" #include "references.hh" @@ -12,6 +14,9 @@ #include "topo-sort.hh" #include "callback.hh" +#include <regex> +#include <queue> + #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> @@ -140,6 +145,16 @@ DerivationGoal::~DerivationGoal() } +string DerivationGoal::key() +{ + /* Ensure that derivations get built in order of their name, + i.e. a derivation named "aardvark" always comes before + "baboon". And substitution goals always happen before + derivation goals (due to "b$"). */ + return "b$" + std::string(drvPath.name()) + "$" + worker.store.printStorePath(drvPath); +} + + inline bool DerivationGoal::needsHashRewrite() { #if __linux__ diff --git a/src/libstore/build/goal.cc b/src/libstore/build/goal.cc index 404a430f7..2dd7a4d37 100644 --- a/src/libstore/build/goal.cc +++ b/src/libstore/build/goal.cc @@ -1,4 +1,5 @@ -#include "build.hh" +#include "goal.hh" +#include "worker.hh" namespace nix { diff --git a/src/libstore/build/hook-instance.cc b/src/libstore/build/hook-instance.cc index a33d5e22b..0f6f580be 100644 --- a/src/libstore/build/hook-instance.cc +++ b/src/libstore/build/hook-instance.cc @@ -1,4 +1,5 @@ -#include "build.hh" +#include "globals.hh" +#include "hook-instance.hh" namespace nix { diff --git a/src/libstore/build/local-store-build.cc b/src/libstore/build/local-store-build.cc index 407979b1e..a05fb5805 100644 --- a/src/libstore/build/local-store-build.cc +++ b/src/libstore/build/local-store-build.cc @@ -1,4 +1,7 @@ -#include "build.hh" +#include "machines.hh" +#include "worker.hh" +#include "substitution-goal.hh" +#include "derivation-goal.hh" namespace nix { diff --git a/src/libstore/build/substitution-goal.cc b/src/libstore/build/substitution-goal.cc index dd2ce94a6..d16584f65 100644 --- a/src/libstore/build/substitution-goal.cc +++ b/src/libstore/build/substitution-goal.cc @@ -1,4 +1,5 @@ -#include "build.hh" +#include "worker.hh" +#include "substitution-goal.hh" #include "nar-info.hh" #include "finally.hh" diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index 2fc9f6982..5c3fe2f57 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -1,4 +1,8 @@ -#include "build.hh" +#include "machines.hh" +#include "worker.hh" +#include "substitution-goal.hh" +#include "derivation-goal.hh" +#include "hook-instance.hh" #include <poll.h> |