mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
lib.fetchers.withNormalizedHash: share removed attributes for every call
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user