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

pyopencl: enable package build for macOS #99921

wants to merge 1 commit into
base: master


Copy link

@ryanorendorff ryanorendorff commented Oct 7, 2020

Motivation for this change

pyopencl can work on macOS (specifically Catalina), but did not build in nixpkgs due to a linux only optional dependency and missing header files. This PR enables pyopencl to be used on macOS.

Tested using the following command from the root of the nixpkgs repo

nix-shell -E "with (import ./default.nix {}); (pkgs.python3.withPackages (p: with p; [numpy pyopencl setuptools])).env"

and then running the example on the front page of the pyopencl documentation:


Tested on macOS Catalina 10.15.5 and Nixos 20.03.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits
Copy link
Contributor Author

@ryanorendorff ryanorendorff commented Oct 7, 2020

I can add my handle to maintainers if you want me to keep track of the mac build.

Copy link
Contributor Author

@ryanorendorff ryanorendorff commented Oct 14, 2020

Hmm I am not quite sure why the build fails with the following error on the CI test.

anonymous function at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/packet-spot-eval-3/pkgs/development/python-modules/pyopencl/default.nix:1:1 called without required argument 'libGL_driver', at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/packet-spot-eval-3/lib/customisation.nix:69:16

I double checked that the shell test still passes.

Any thoughts?

Copy link

@SuperSandro2000 SuperSandro2000 left a comment

Please squash the commits together.

@ryanorendorff ryanorendorff force-pushed the ryanorendorff:pyopencl-macos branch from 9fd8e61 to 9124e22 Nov 27, 2020
Copy link
Contributor Author

@ryanorendorff ryanorendorff commented Nov 27, 2020

Please squash the commits together.


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

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.