mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-06 09:41:39 -05:00
fix: wheel is not tarball...
This commit is contained in:
parent
1a2045ef51
commit
0e9c1d8599
1 changed files with 8 additions and 1 deletions
|
@ -46,6 +46,7 @@ pythonPackages.callPackage
|
|||
isSource = source != null;
|
||||
isGit = isSource && source.type == "git";
|
||||
isUrl = isSource && source.type == "url";
|
||||
isWheelUrl = isSource && source.type == "url" && lib.strings.hasSuffix ".whl" source.url;
|
||||
isDirectory = isSource && source.type == "directory";
|
||||
isFile = isSource && source.type == "file";
|
||||
isLegacy = isSource && source.type == "legacy";
|
||||
|
@ -94,7 +95,7 @@ pythonPackages.callPackage
|
|||
else (builtins.elemAt (lib.strings.splitString "-" name) 2);
|
||||
};
|
||||
|
||||
format = if isDirectory || isGit || isUrl then "pyproject" else fileInfo.format;
|
||||
format = if isWheelUrl then "wheel" else if isDirectory || isGit || isUrl then "pyproject" else fileInfo.format;
|
||||
|
||||
hooks = python.pkgs.callPackage ./hooks { };
|
||||
in
|
||||
|
@ -181,6 +182,12 @@ pythonPackages.callPackage
|
|||
}
|
||||
))
|
||||
)
|
||||
else if isWheelUrl then
|
||||
builtins.fetchurl
|
||||
{
|
||||
inherit (source) url;
|
||||
sha256 = fileInfo.hash;
|
||||
}
|
||||
else if isUrl then
|
||||
builtins.fetchTarball
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue