From 03962f077c087ec71551e0f3a33c83fce51e5efa Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Thu, 14 Mar 2024 08:59:54 -0700 Subject: [PATCH] Avoid top-level `with ...;` in pkgs/build-support/coq/default.nix --- pkgs/build-support/coq/default.nix | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/coq/default.nix b/pkgs/build-support/coq/default.nix index eb045ddf6865..6036d0f05dd5 100644 --- a/pkgs/build-support/coq/default.nix +++ b/pkgs/build-support/coq/default.nix @@ -1,10 +1,33 @@ { lib, stdenv, coqPackages, coq, which, fetchzip }@args: -let lib = import ./extra-lib.nix {inherit (args) lib;}; in -with builtins; with lib; + let + lib = import ./extra-lib.nix { + inherit (args) lib; + }; + + inherit (lib) + concatStringsSep + flip + foldl + isFunction + isString + optional + optionalAttrs + optionals + optionalString + pred + remove + switch + versions + ; + + inherit (lib.attrsets) removeAttrs; + inherit (lib.strings) match; + isGitHubDomain = d: match "^github.*" d != null; isGitLabDomain = d: match "^gitlab.*" d != null; in + { pname, version ? null, fetcher ? null,