Skip to content

Commit

Permalink
Avoid shallow clone of notmuch
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
marienz committed Jul 2, 2024
1 parent 0fb952b commit 1d61287
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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 (
Expand Down
5 changes: 5 additions & 0 deletions fetch-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
}

0 comments on commit 1d61287

Please sign in to comment.