lib.fetchers.withNormalizedHash: share removed attributes for every call

This commit is contained in:
Eman Resu
2026-05-19 22:04:44 -04:00
parent 25118b87ed
commit fb84fe6d6f

View File

@@ -199,6 +199,12 @@ rec {
and is implemented somewhat more efficiently.
*/
withNormalizedHash =
let
removedAttributes = [
"outputHash"
"outputHashAlgo"
];
in
{
hashTypes ? defaultHashTypes,
}:
@@ -219,10 +225,7 @@ rec {
assert intersectAttrs fArgs hashSet == { };
setFunctionArgs (args: fetcher (normalize args)) (
removeAttrs fArgs [
"outputHash"
"outputHashAlgo"
]
removeAttrs fArgs removedAttributes
// {
hash = fArgs.outputHash;
}