remove fetchGit allRefs flag for nix <2.4

Prevent use of allRefs when nix <2.4 is in use.
nix <2.4 does not accept the `allRefs` flag, but has `allRefs` behavior
by default.  Note that this goes beyond the the initial intent of this
PR because it enables naersk's `gitAllRefs` flag to work on nix <2.4.
This commit is contained in:
Daniel Goertzen 2022-06-06 09:31:15 -05:00 committed by Patryk Wychowaniec
parent e300ddf8cb
commit cddffb5aa2

View file

@ -111,7 +111,7 @@ rec
ref = lock.branch;
} // lib.optionalAttrs (lock ? tag) {
ref = lock.tag;
} // lib.optionalAttrs (gitAllRefs || lock ? rev) {
} // lib.optionalAttrs ((lib.versionAtLeast builtins.nixVersion "2.4") && (gitAllRefs || lock ? rev)) {
allRefs = true;
} // lib.optionalAttrs gitSubmodules {
submodules = true;