Avoid top-level with ...; in pkgs/build-support/fetchsourcehut/default.nix

This commit is contained in:
Philip Taron 2024-03-14 09:53:57 -07:00 committed by Valentin Gagarin
parent aa32ce526a
commit 869e556606

View File

@ -1,6 +1,14 @@
{ fetchgit, fetchhg, fetchzip, lib }:
lib.makeOverridable (
let
inherit (lib)
assertOneOf
makeOverridable
optionalString
;
in
makeOverridable (
{ owner
, repo, rev
, domain ? "sr.ht"
@ -10,9 +18,7 @@ lib.makeOverridable (
, ... # For hash agility
} @ args:
with lib;
assert (lib.assertOneOf "vc" vc [ "hg" "git" ]);
assert (assertOneOf "vc" vc [ "hg" "git" ]);
let
urlFor = resource: "https://${resource}.${domain}/${owner}/${repo}";