1
0
Fork 0
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:
Valentin Gagarin 2024-04-12 17:43:35 +02:00 committed by GitHub
parent 5b9cb8b372
commit 13c2005e7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 7 deletions

View file

@ -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);
}
}