Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow usage of universal2 wheels #1281

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ let

rawDeps = pyProject.tool.poetry."dependencies" or { };

rawRequiredDeps = lib.filterAttrs (_: v: !(v.optional or false)) rawDeps;
isRequired = (dep: !((dep.optional or false) || (builtins.isList dep && !(lib.lists.any isRequired dep))));

rawRequiredDeps = lib.filterAttrs (_: v: isRequired v) rawDeps;

desiredExtrasDeps = lib.unique
(lib.concatMap (extra: pyProject.tool.poetry.extras.${extra}) extras);
Expand Down
4 changes: 2 additions & 2 deletions pep425.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ let
if stdenv.isDarwin
then
if stdenv.targetPlatform.isAarch64
then (p: p == "any" || (hasInfix "macosx" p && lib.lists.any (e: hasSuffix e p) [ "arm64" "aarch64" ]))
else (p: p == "any" || (hasInfix "macosx" p && hasSuffix "x86_64" p))
then (p: p == "any" || (hasInfix "macosx" p && lib.lists.any (e: hasSuffix e p) [ "arm64" "aarch64" "universal2" ]))
else (p: p == "any" || (hasInfix "macosx" p && lib.lists.any (e: hasSuffix e p) [ "x86_64" "universal2" ]))
else (p: p == "any");
withPlatforms = x: lib.lists.any withPlatform (splitString "." x.platform);
filterWheel = x:
Expand Down
Loading