mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
add intermediate variables and clarifying comments (#9274)
* add intermediate variables and clarifying comments Co-authored-by: Alexander Groleau <alex@proof.construction> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
parent
5b9cb8b372
commit
13c2005e7d
2 changed files with 16 additions and 7 deletions
|
@ -131,12 +131,12 @@ StorePath StoreDirConfig::makeFixedOutputPath(std::string_view name, const Fixed
|
|||
throw Error("fixed output derivation '%s' is not allowed to refer to other store paths.\nYou may need to use the 'unsafeDiscardReferences' derivation attribute, see the manual for more details.",
|
||||
name);
|
||||
}
|
||||
return makeStorePath("output:out",
|
||||
hashString(HashAlgorithm::SHA256,
|
||||
"fixed:out:"
|
||||
// make a unique digest based on the parameters for creating this store object
|
||||
auto payload = "fixed:out:"
|
||||
+ makeFileIngestionPrefix(info.method)
|
||||
+ info.hash.to_string(HashFormat::Base16, true) + ":"),
|
||||
name);
|
||||
+ info.hash.to_string(HashFormat::Base16, true) + ":";
|
||||
auto digest = hashString(HashAlgorithm::SHA256, payload);
|
||||
return makeStorePath("output:out", digest, name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue