Skip to content

Commit

Permalink
fetchGit: work-around bug in Nix 2.4
Browse files Browse the repository at this point in the history
Another approach to make `poetry2nix` work with dependencies specified
by arbitrary `rev=<hash>` values on newer Nix revisions.

Relates-to: nix-community#358
Relates-to: NixOS/nix#5128
  • Loading branch information
László Vaskó committed Oct 20, 2021
1 parent e96faf1 commit 389b285
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mk-poetry-dep.nix
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,13 @@ 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");
}
} // (lib.optionalAttrs (builtins.compareVersions builtins.nixVersion "2.3" > 0) {
allRefs = true;
}))
)
else if isUrl then
builtins.fetchTarball
Expand Down

0 comments on commit 389b285

Please sign in to comment.