From 37da9ce04592299d0e40df6ff0bceacd60873034 Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Tue, 2 Jul 2024 21:59:49 +1000 Subject: [PATCH] Extend/generalize shallow clone avoidance Savannah seems to have the same problem. CI fails for emms. Extend to all of savannah as we'll presumably hit this for several other packages next... --- default.nix | 6 ++++-- fetch-overrides.nix | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/default.nix b/default.nix index c4a45b5..781f739 100644 --- a/default.nix +++ b/default.nix @@ -59,7 +59,7 @@ }: let inherit (lib) optionalAttrs optionalString; - inherit (import ./fetch-overrides.nix) extraPins extraUrls forceDeepClone; + inherit (import ./fetch-overrides.nix) extraPins extraUrls forceDeepCloneDomains; # Step 1: determine which Emacs packages to pull in. # @@ -261,7 +261,9 @@ let } // optionalAttrs (p ? recipe.branch) { ref = p.recipe.branch; } // optionalAttrs (p ? recipe.depth) { shallow = p.recipe.depth == 1; } - // optionalAttrs (forceDeepClone.${url} or false) { shallow = false; }; + // optionalAttrs (lib.any (d: lib.hasPrefix d url) forceDeepCloneDomains) { + shallow = false; + }; src = if experimentalFetchTree then builtins.fetchTree ( diff --git a/fetch-overrides.nix b/fetch-overrides.nix index e7f978e..fd96189 100644 --- a/fetch-overrides.nix +++ b/fetch-overrides.nix @@ -55,8 +55,9 @@ git-commit = "ea0f07e54967197ac0b072a69ba314314a4080c1"; }; - # Repositories for which to force `shallow = false`. - forceDeepClone = { - "https://git.notmuchmail.org/git/notmuch" = true; - }; + # Domains for which to force `shallow = false`. + forceDeepCloneDomains = [ + "https://git.notmuchmail.org/" + "https://git.savannah.gnu.org/" + ]; }