diff options
author | Carlo Nucera <carlo.nucera@protonmail.com> | 2020-06-01 17:12:50 -0400 |
---|---|---|
committer | Carlo Nucera <carlo.nucera@protonmail.com> | 2020-06-01 17:12:50 -0400 |
commit | f4b89e11a4d9d6e50720fbe0db9041b6fe442cd5 (patch) | |
tree | f2d3349a857cdee06ce1de7bd451f509ec1ae5c1 /src/libexpr | |
parent | 6dd471ebf6b9a4996405398093ccb371b8abdf2f (diff) | |
parent | 5b4cd84bc2ff4d7a233d6dd2fd1a5a8cfd85d889 (diff) |
Merge branch 'no-stringly-typed-derivation-output' of github.com:Ericson2314/nix into validPathInfo-ca-proper-datatype
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/primops.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 8fbcef8c8..b6e889e15 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -723,12 +723,9 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * * auto outPath = state.store->makeFixedOutputPath(ingestionMethod, h, drvName); if (!jsonObject) drv.env["out"] = state.store->printStorePath(outPath); - drv.outputs.insert_or_assign("out", DerivationOutput { - std::move(outPath), - (ingestionMethod == FileIngestionMethod::Recursive ? "r:" : "") - + printHashType(h.type), - h.to_string(Base::Base16, false), - }); + drv.outputs.insert_or_assign("out", DerivationOutput( + std::move(outPath), + FileSystemHash(ingestionMethod, std::move(h)))); } else { @@ -741,7 +738,7 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * * for (auto & i : outputs) { if (!jsonObject) drv.env[i] = ""; drv.outputs.insert_or_assign(i, - DerivationOutput(StorePath::dummy.clone(), "", "")); + DerivationOutput(StorePath::dummy.clone(), std::optional<FileSystemHash>())); } Hash h = hashDerivationModulo(*state.store, Derivation(drv), true); @@ -750,7 +747,7 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * * auto outPath = state.store->makeOutputPath(i, h, drvName); if (!jsonObject) drv.env[i] = state.store->printStorePath(outPath); drv.outputs.insert_or_assign(i, - DerivationOutput(std::move(outPath), "", "")); + DerivationOutput(std::move(outPath), std::optional<FileSystemHash>())); } } |