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/nix | |
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/nix')
-rw-r--r-- | src/nix/dev-shell.cc | 4 | ||||
-rw-r--r-- | src/nix/show-derivation.cc | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/nix/dev-shell.cc b/src/nix/dev-shell.cc index d300f6a23..337d7750e 100644 --- a/src/nix/dev-shell.cc +++ b/src/nix/dev-shell.cc @@ -135,7 +135,9 @@ StorePath getDerivationEnvironment(ref<Store> store, const StorePath & drvPath) drv.inputSrcs.insert(std::move(getEnvShPath)); Hash h = hashDerivationModulo(*store, drv, true); auto shellOutPath = store->makeOutputPath("out", h, drvName); - drv.outputs.insert_or_assign("out", DerivationOutput(shellOutPath.clone(), "", "")); + drv.outputs.insert_or_assign("out", DerivationOutput(shellOutPath.clone(), FileSystemHash { + FileIngestionMethod::Flat, Hash { } + })); drv.env["out"] = store->printStorePath(shellOutPath); auto shellDrvPath2 = writeDerivation(store, drv, drvName); diff --git a/src/nix/show-derivation.cc b/src/nix/show-derivation.cc index 22c569f3c..87387002d 100644 --- a/src/nix/show-derivation.cc +++ b/src/nix/show-derivation.cc @@ -72,9 +72,9 @@ struct CmdShowDerivation : InstallablesCommand for (auto & output : drv.outputs) { auto outputObj(outputsObj.object(output.first)); outputObj.attr("path", store->printStorePath(output.second.path)); - if (output.second.hash != "") { - outputObj.attr("hashAlgo", output.second.hashAlgo); - outputObj.attr("hash", output.second.hash); + if (output.second.hash) { + outputObj.attr("hashAlgo", output.second.hash->printMethodAlgo()); + outputObj.attr("hash", output.second.hash->hash.to_string(Base::Base16, false)); } } } |