Commit 8376e182 authored by nicoo's avatar nicoo
Browse files

lib.fetchers: replace `with`-bindings with explicit `let inherit`

parent f470dc70
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -68,10 +68,12 @@ rec {
    required ? true,
  }:
    let
      inherit (lib) concatMapStringsSep const head tail throwIf;
      inherit (lib.attrsets) attrsToList genAttrs intersectAttrs removeAttrs optionalAttrs;

      hNames = [ "hash" ] ++ hashTypes;
      hAttrs = genAttrs hNames (const {});
    in
    with builtins; with lib;
      args:
        if args ? "outputHash" then
          args
@@ -147,8 +149,10 @@ rec {
  withNormalizedHash = {
    hashTypes ? [ "sha256" ]
  }: fetcher:
    with builtins; with lib;
    let
      inherit (lib.attrsets) genAttrs intersectAttrs removeAttrs;
      inherit (lib.trivial) const functionArgs setFunctionArgs;

      hAttrs = genAttrs ([ "hash" ] ++ hashTypes) (const {});
      fArgs = functionArgs fetcher;