Avoid shallow clone of notmuch

Shallow clones are the default in Nix 2.23, but the Git server for
notmuch does not seem to allow shallow clones of specific revisions.

Disable them, which should make no difference for Nix < 2.23.

This is mostly to (hopefully) unblock CI. If this fixes it, I should
investigate if it is possible for Nix to fall back to a full clone in
this scenario.
This commit is contained in:
Marien Zwart 2024-07-02 21:41:10 +10:00
parent 0fb952b3ce
commit 1d61287aff
No known key found for this signature in database
2 changed files with 8 additions and 2 deletions

View file

@ -59,7 +59,7 @@
}:
let
inherit (lib) optionalAttrs optionalString;
inherit (import ./fetch-overrides.nix) extraPins extraUrls;
inherit (import ./fetch-overrides.nix) extraPins extraUrls forceDeepClone;
# Step 1: determine which Emacs packages to pull in.
#
@ -260,7 +260,8 @@ let
}
// optionalAttrs (p ? recipe.branch) { ref = p.recipe.branch; }
// optionalAttrs (p ? recipe.depth) { shallow = p.recipe.depth == 1; };
// optionalAttrs (p ? recipe.depth) { shallow = p.recipe.depth == 1; }
// optionalAttrs (forceDeepClone.${url} or false) { shallow = false; };
src =
if experimentalFetchTree
then builtins.fetchTree (

View file

@ -54,4 +54,9 @@
# CI should fail again the next time Doom updates magit, so this won't go stale.
git-commit = "ea0f07e54967197ac0b072a69ba314314a4080c1";
};
# Repositories for which to force `shallow = false`.
forceDeepClone = {
"https://git.notmuchmail.org/git/notmuch" = true;
};
}