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

Python package not selected due to darwinSdkVersion mismatch on M1 Mac #1597

Open
heimalne opened this issue Apr 16, 2024 · 2 comments
Open

Comments

@heimalne
Copy link

I'm struggling to get an private package dependency to download. Its wheel file doesn't get selected, because the actual platform of the wheel file <somepackage>-20.0.1-cp39-cp39-macosx_14_0_arm64.whl is for MacOS darwin Version 14 and my M1 Mac should satisfy this:

$ python -m platform
macOS-14.4.1-arm64-arm-64bit

but the poetry2nix wheel selection filtering is being done against an older darwin version 11, i.e.
python.stdenv.targetPlatform from mk-poetry-dep.nix
is by default:

{
  config = "aarch64-apple-darwin";
  darwinArch = "arm64";
  darwinMinVersion = "11.0";
  darwinMinVersionVariable = "MACOSX_DEPLOYMENT_TARGET";
  darwinPlatform = "macos";
  darwinSdkVersion = "11.0";
  efiArch = "aa64";
...
}

Is that the intended default behavior? How can i override darwinSdkVersion?
I could add some section to documention afterwards.

@heimalne
Copy link
Author

The Nix default target architecture for Mac indeed seems to be darwinSdkVersion 11 as newer versions are being worked on in NixOS/nixpkgs#229210.

In the Python ecosystem many wheels are being build against sdk version 12 (e.g. tensorflow) as that seems to be the new minimal version. But poetry2nix doesn't select those wheels even though they work on a sdk version 14 machine. We probably need a mechanism to allow such higher sdk version wheels in the mean time until sdk 12 is officially supported in nixpkgs.

@heimalne
Copy link
Author

darwinSdk 12.3 was merged in a preliminary form to nixpkgs NixOS/nixpkgs#326406 Here is some help on how to use it (haven't tried it yet though): https://discourse.nixos.org/t/darwin-updates-news/42249/14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant