Skip to content

Commit

Permalink
remove fetchGit allRefs flag for nix <2.4
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
goertzenator authored and Patryk27 committed Jun 12, 2022
1 parent e300ddf commit cddffb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cddffb5

Please sign in to comment.