diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-01-21 21:14:13 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-01-21 21:14:13 +0100 |
commit | aef635da78d33bf679f49fd10e7130d918a82549 (patch) | |
tree | dc844bf8b09ff1d1b50db3ba3143d24a26775c71 /src/libexpr/primops.cc | |
parent | 8b09105db3869284ee7892f82155dda79f98d6e6 (diff) |
Fix derivation computation with __structuredAttrs and multiple outputs
Fixes
error: derivation '/nix/store/klivma7r7h5lndb99f7xxmlh5whyayvg-zlib-1.2.11.drv' has incorrect output '/nix/store/fv98nnx5ykgbq8sqabilkgkbc4169q05-zlib-1.2.11-dev', should be '/nix/store/adm7pilzlj3z5k249s8b4wv3scprhzi1-zlib-1.2.11-dev'
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 3ef827ebc..29302c9b6 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -731,6 +731,8 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * * the hash. */ for (auto & i : outputs) { if (!jsonObject) drv.env[i] = ""; + drv.outputs.insert_or_assign(i, + DerivationOutput(StorePath::dummy.clone(), "", "")); } Hash h = hashDerivationModulo(*state.store, Derivation(drv), true); |