Skip to content

Commit

Permalink
Merge pull request #512 from nix-community/fetchgit-nix24
Browse files Browse the repository at this point in the history
 fetchGit: work-around bug in Nix 2.4
  • Loading branch information
adisbladis authored Jan 17, 2022
2 parents a47cc10 + 8e1eef3 commit 6f31c4e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions mk-poetry-dep.nix
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,18 @@ pythonPackages.callPackage
src =
if isGit then
(
builtins.fetchGit {
builtins.fetchGit ({
inherit (source) url;
rev = source.resolved_reference or source.reference;
ref = sourceSpec.branch or sourceSpec.rev or (if sourceSpec?tag then "refs/tags/${sourceSpec.tag}" else "HEAD");
}
ref = sourceSpec.branch or (if sourceSpec ? tag then "refs/tags/${sourceSpec.tag}" else "HEAD");
} // (
let
nixVersion = builtins.substring 0 3 builtins.nixVersion;
in
lib.optionalAttrs ((sourceSpec ? rev) && (lib.versionAtLeast nixVersion "2.4")) {
allRefs = true;
}
))
)
else if isUrl then
builtins.fetchTarball
Expand Down

0 comments on commit 6f31c4e

Please sign in to comment.