From 869e55660606c401d4dec02f9ab1adda5b450521 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Thu, 14 Mar 2024 09:53:57 -0700 Subject: [PATCH] Avoid top-level `with ...;` in pkgs/build-support/fetchsourcehut/default.nix --- pkgs/build-support/fetchsourcehut/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/fetchsourcehut/default.nix b/pkgs/build-support/fetchsourcehut/default.nix index ed6e85bd639b..42d437b3555e 100644 --- a/pkgs/build-support/fetchsourcehut/default.nix +++ b/pkgs/build-support/fetchsourcehut/default.nix @@ -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}";