mirror of
https://github.com/NixOS/nix
synced 2025-07-08 11:03:54 +02:00
Adapt scheduler to work with dynamic derivations
To avoid dealing with an optional `drvPath` (because we might not know it yet) everywhere, make an `CreateDerivationAndRealiseGoal`. This goal just builds/substitutes the derivation file, and then kicks of a build for that obtained derivation; in other words it does the chaining of goals when the drv file is missing (as can already be the case) or computed (new case). This also means the `getDerivation` state can be removed from `DerivationGoal`, which makes the `BasicDerivation` / in memory case and `Derivation` / drv file file case closer together. The map type is factored out for clarity, and because we will soon hvae a second use for it (`Derivation` itself). Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
parent
692074f714
commit
5e3986f59c
14 changed files with 525 additions and 58 deletions
|
@ -18,4 +18,6 @@ clearStore
|
|||
|
||||
drvDep=$(nix-instantiate ./text-hashed-output.nix -A producingDrv)
|
||||
|
||||
expectStderr 1 nix build "${drvDep}^out^out" --no-link | grepQuiet "Building dynamic derivations in one shot is not yet implemented"
|
||||
out2=$(nix build "${drvDep}^out^out" --no-link)
|
||||
|
||||
test $out1 == $out2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue