Loading lib/fetchers.nix +10 −6 Original line number Diff line number Diff line # snippets that can be shared by multiple fetchers (pkgs/build-support) { lib }: rec { let commonH = hashTypes: rec { hNames = [ "hash" ] ++ hashTypes; hAttrs = lib.genAttrs hNames (lib.const {}); }; in rec { proxyImpureEnvVars = [ # We borrow these environment variables from the caller to allow Loading Loading @@ -68,11 +73,10 @@ rec { required ? true, }: let inherit (lib) concatMapStringsSep const head tail throwIf; inherit (lib.attrsets) attrsToList genAttrs intersectAttrs removeAttrs optionalAttrs; inherit (lib) concatMapStringsSep head tail throwIf; inherit (lib.attrsets) attrsToList intersectAttrs removeAttrs optionalAttrs; hNames = [ "hash" ] ++ hashTypes; hAttrs = genAttrs hNames (const {}); inherit (commonH hashTypes) hAttrs hNames; in args: if args ? "outputHash" then Loading Loading @@ -153,7 +157,7 @@ rec { inherit (lib.attrsets) genAttrs intersectAttrs removeAttrs; inherit (lib.trivial) const functionArgs setFunctionArgs; hAttrs = genAttrs ([ "hash" ] ++ hashTypes) (const {}); inherit (commonH hashTypes) hAttrs; fArgs = functionArgs fetcher; normalize = normalizeHash { Loading Loading
lib/fetchers.nix +10 −6 Original line number Diff line number Diff line # snippets that can be shared by multiple fetchers (pkgs/build-support) { lib }: rec { let commonH = hashTypes: rec { hNames = [ "hash" ] ++ hashTypes; hAttrs = lib.genAttrs hNames (lib.const {}); }; in rec { proxyImpureEnvVars = [ # We borrow these environment variables from the caller to allow Loading Loading @@ -68,11 +73,10 @@ rec { required ? true, }: let inherit (lib) concatMapStringsSep const head tail throwIf; inherit (lib.attrsets) attrsToList genAttrs intersectAttrs removeAttrs optionalAttrs; inherit (lib) concatMapStringsSep head tail throwIf; inherit (lib.attrsets) attrsToList intersectAttrs removeAttrs optionalAttrs; hNames = [ "hash" ] ++ hashTypes; hAttrs = genAttrs hNames (const {}); inherit (commonH hashTypes) hAttrs hNames; in args: if args ? "outputHash" then Loading Loading @@ -153,7 +157,7 @@ rec { inherit (lib.attrsets) genAttrs intersectAttrs removeAttrs; inherit (lib.trivial) const functionArgs setFunctionArgs; hAttrs = genAttrs ([ "hash" ] ++ hashTypes) (const {}); inherit (commonH hashTypes) hAttrs; fArgs = functionArgs fetcher; normalize = normalizeHash { Loading