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
python3Packages.wxPython_4_0: build on darwin #97101
Conversation
how does the |
6370dc7
to
65250b1
Compare
It does not, no idea how and from where it even slipped in... removed by re-creating the branch and cherry-picking on top. |
@GrahamcOfBorg eval |
Result of 24 packages marked as broken and skipped:
2 packages failed to build:
27 packages built:
Failures are kinda related to this PR because otherwise the python package won't build. |
For mavproxy to build: diff --git a/pkgs/applications/science/robotics/mavproxy/default.nix b/pkgs/applications/science/robotics/mavproxy/default.nix
index c354dad80428..170c7fea2d8a 100644
--- a/pkgs/applications/science/robotics/mavproxy/default.nix
+++ b/pkgs/applications/science/robotics/mavproxy/default.nix
@@ -1,5 +1,5 @@
-{ lib, buildPythonApplication, fetchPypi, matplotlib, numpy, pymavlink, pyserial
-, setuptools, wxPython_4_0 }:
+{ stdenv, buildPythonApplication, fetchPypi, matplotlib, numpy, pymavlink, pyserial
+, setuptools, wxPython_4_0, billiard, gnureadline }:
buildPythonApplication rec {
pname = "MAVProxy";
@@ -10,6 +10,11 @@ buildPythonApplication rec {
sha256 = "1rbq2nm01212rp5xbl8p8kjl2mpgfppkwjsq3lnfw1v6g0m4359h";
};
+ postPatch = ''
+ substituteInPlace setup.py \
+ --replace "opencv-python" ""
+ '';
+
propagatedBuildInputs = [
matplotlib
numpy
@@ -17,12 +22,12 @@ buildPythonApplication rec {
pyserial
setuptools
wxPython_4_0
- ];
+ ] ++ stdenv.lib.optionals stdenv.isDarwin [ billiard gnureadline ];
# No tests
doCheck = false;
- meta = with lib; {
+ meta = with stdenv.lib; {
description = "MAVLink proxy and command line ground station";
homepage = "https://github.com/ArduPilot/MAVProxy";
license = licenses.gpl3; |
For plover.stable to build we need to patch the following: hidapi: diff --git a/pkgs/development/python-modules/hidapi/default.nix b/pkgs/development/python-modules/hidapi/default.nix
index b1c21b106b56..5ffb198b6905 100644
--- a/pkgs/development/python-modules/hidapi/default.nix
+++ b/pkgs/development/python-modules/hidapi/default.nix
@@ -9,18 +9,21 @@ buildPythonPackage rec {
sha256 = "5a2442928f17ba742d9c53073f48b152051c5747d758d2fefd937543da5ab2e5";
};
- propagatedBuildInputs =
- stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ] ++
- stdenv.lib.optionals stdenv.isDarwin [ darwin.IOKit darwin.apple_sdk.frameworks.CoreFoundation ] ++
- [ cython ];
-
# Fix the USB backend library lookup
postPatch = stdenv.lib.optionalString stdenv.isLinux ''
libusb=${libusb1.dev}/include/libusb-1.0
test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py
+ '' + stdenv.lib.optionalString stdenv.isDarwin ''
+ substituteInPlace setup.py \
+ --replace "subprocess.check_output(['xcrun', '--show-sdk-path']).decode().strip()" '"${darwin.apple_sdk.sdk.version}"'
'';
+ propagatedBuildInputs =
+ stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ] ++
+ stdenv.lib.optionals stdenv.isDarwin [ darwin.IOKit darwin.apple_sdk.frameworks.CoreFoundation ] ++
+ [ cython ];
+
meta = with stdenv.lib; {
description = "A Cython interface to the hidapi from https://github.com/signal11/hidapi";
homepage = "https://github.com/trezor/cython-hidapi"; |
As the original author did not respond for a while I am doing a PR which supersedes this one and implements all the review comments. Stay tuned! |
I did respond to one of the comments today, but it's also fine if you just create your own PR. |
Oh sorry, I must have missed that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nitpicks from me :) Sorry about the hasty overtaking.
@@ -26,8 +29,16 @@ buildPythonPackage rec { | |||
|
|||
doCheck = false; | |||
|
|||
nativeBuildInputs = [ pkgconfig which doxygen wxGTK ]; | |||
buildInputs = [ ncurses wxGTK.gtk ]; | |||
nativeBuildInputs = [ pkgconfig which doxygen ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nativeBuildInputs = [ pkgconfig which doxygen ] | |
nativeBuildInputs = [ pkg-config which doxygen ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to check that, did that package name change recently? Right now it is passed as pkgconfig
in the arguments...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We renamed pkgconfig to pkg-config but if this is the python module that it is still the same name. I am confused now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything in pkgs/top-level/python-packages.nix
passes pkgs.pkgconfig
. Doesn't look to me that we should change that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a python package named pkgconfig and it would be great to distinguish them. Also eventually we want to remove the alias to pkgconfig. Also when things got changed recently we can't rely on how it is done everywhere else if everywhere else might not be changed yet.
Result of 8 packages built:
|
Result of 23 packages marked as broken and skipped:
2 packages failed to build:
28 packages built:
|
Now I'm stuck, because I cannot even start to build
@SuperSandro2000 How did you get this to work in the first place? |
I just ran |
Result of 20 packages marked as broken and skipped:
2 packages failed to build:
28 packages built:
|
6263ba9
to
2eb06cb
Compare
The actual problem seems to already start with the sandbox blocking access to the frameworks:
Is changing nix configuration the only solution we have right now? |
@SuperSandro2000 Sorry for spamming you, but I'm really frustrated that I can't get it to build locally. It won't scale if I have to beg people to run the review script all the time. I tried reinstalling Xcode Commandline Tools (prominent search suggestion for this issue), tried without them altogether, tried |
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 20 packages marked as broken and skipped:
32 packages failed to build and are new build failures:
1 package built:
|
Disable the test? I have no better idea. |
@SuperSandro It looks like your build machine may has run full:
|
I guess I rebuild it an we see how it goes. |
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 20 packages marked as broken and skipped:
2 packages failed to build and are new build failures:
28 packages built:
The following issues got detected with the above build packages. winpdb: Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We recently decided to no longer use stdenv.lib.
Other than the 5 comments this is LGTM.
@@ -26,8 +29,16 @@ buildPythonPackage rec { | |||
|
|||
doCheck = false; | |||
|
|||
nativeBuildInputs = [ pkgconfig which doxygen wxGTK ]; | |||
buildInputs = [ ncurses wxGTK.gtk ]; | |||
nativeBuildInputs = [ pkgconfig which doxygen ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a python package named pkgconfig and it would be great to distinguish them. Also eventually we want to remove the alias to pkgconfig. Also when things got changed recently we can't rely on how it is done everywhere else if everywhere else might not be changed yet.
c528f4e
to
bb2879d
Compare
@SuperSandro2000 Cleaned up the commits and messages, should be ready to merge after a final test build.
I see how this on your refactoring agenda, and I agree it should be done. But this is my first PR and it already took 3 months to get ready, because building on Darwin is such a pain that I cannot even do my own |
If you didn't rebase against master I could have looked at the force push diff but now github just shows me a unicorn. |
Sorry, damn these unicorns. I just added all your change requests, except the |
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 20 packages marked as broken and skipped:
2 packages failed to build and are new build failures:
28 packages built:
The following issues got detected with the above build packages. winpdb: Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
|
It would be great if you could change that with the next update or something. You don't need to do another PR that fixes solely that. |
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 11 packages built:
|
Motivation for this change
Fix #86040
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)Building in sandbox cannot be checked, because
clang
fails, as described in #41099 and #41099:Building reverse dependencies fails for the same reason. Essentially I have no idea if I broke something for Darwin users and no reasonable way to check it.
@LnL7 is there any progress with (or even desire to) fixing sandboxing on Darwin?