Skip to content

Commit

Permalink
Fix git dependencies on non-default branches
Browse files Browse the repository at this point in the history
Closes #73
  • Loading branch information
adisbladis committed Mar 27, 2020
1 parent 370c9b6 commit df8c981
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions default.nix
Expand Up @@ -79,6 +79,7 @@ let
source = pkgMeta.source or null;
files = lockFiles.${name};
pythonPackages = self;
sourceSpec = pyProject.tool.poetry.dependencies.${name} or pyProject.tool.poetry.dev-dependencies.${name};
}
);
}
Expand Down
2 changes: 2 additions & 0 deletions mk-poetry-dep.nix
Expand Up @@ -14,6 +14,7 @@
, pythonPackages
, python-versions
, pwd
, sourceSpec
, supportedExtensions ? lib.importJSON ./extensions.json
, ...
}:
Expand Down Expand Up @@ -147,6 +148,7 @@ pythonPackages.callPackage (
builtins.fetchGit {
inherit (source) url;
rev = source.reference;
ref = sourceSpec.branch or sourceSpec.rev or sourceSpec.tag or "HEAD";
}
) else if isLocal then (poetryLib.cleanPythonSources { src = localDepPath; }) else fetchFromPypi {
pname = name;
Expand Down

0 comments on commit df8c981

Please sign in to comment.