mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
make wheel selection more sophisticated for m1 macs (#489)
* make wheel selection more sophisticated for m1 macs * remove unneeded parentheses Co-authored-by: Austin Platt <austinplatt@Austins-MacBook-Air.local>
This commit is contained in:
parent
d3e600bf94
commit
5a8fb13cb1
1 changed files with 8 additions and 2 deletions
10
pep425.nix
10
pep425.nix
|
@ -84,7 +84,13 @@ let
|
|||
)
|
||||
else
|
||||
(x: x.platform == "any")
|
||||
else (x: hasInfix "macosx" x.platform || x.platform == "any");
|
||||
else
|
||||
if stdenv.isDarwin
|
||||
then
|
||||
if stdenv.targetPlatform.isAarch64
|
||||
then (x: x.platform == "any" || (hasInfix "macosx" x.platform && lib.lists.any (e: hasSuffix e x.platform) [ "arm64" "aarch64" ]))
|
||||
else (x: x.platform == "any" || (hasInfix "macosx" x.platform && hasSuffix "x86_64" x.platform))
|
||||
else (x: x.platform == "any");
|
||||
filterWheel = x:
|
||||
let
|
||||
f = toWheelAttrs x.file;
|
||||
|
@ -93,7 +99,7 @@ let
|
|||
filtered = builtins.filter filterWheel filesWithoutSources;
|
||||
choose = files:
|
||||
let
|
||||
osxMatches = [ "10_12" "10_11" "10_10" "10_9" "10_8" "10_7" "any" ];
|
||||
osxMatches = [ "12_0" "11_0" "10_12" "10_11" "10_10" "10_9" "10_8" "10_7" "any" ];
|
||||
linuxMatches = [ "manylinux1_" "manylinux2010_" "manylinux2014_" "any" ];
|
||||
chooseLinux = x: lib.take 1 (findBestMatches linuxMatches x);
|
||||
chooseOSX = x: lib.take 1 (findBestMatches osxMatches x);
|
||||
|
|
Loading…
Add table
Reference in a new issue