-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
pythonPackages.glances: fix darwin build #78404
Conversation
# Relevant: https://github.com/NixOS/nixpkgs/issues/24693 | ||
makeWrapperArgs = lib.optional stdenv.isDarwin [ | ||
"--set" "DYLD_FRAMEWORK_PATH" "/System/Library/Frameworks" | ||
]; |
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.
Quoting @LnL7 on IRC:
<LnL> yeah, we solved this for binaries but for languages with an interpreter it's still a problem and requires DYLD_FRAMEWORK_PATH in the wrapper
7d10361
to
7b32cf4
Compare
Note that build fails on Python 3.7 and 3.8 due to missing
but I'm not sure if it's related to my changes? I can debug this further if it's an issue. |
# Relevant: https://github.com/NixOS/nixpkgs/issues/24693 | ||
makeWrapperArgs = lib.optional stdenv.isDarwin [ | ||
"--set" "DYLD_FRAMEWORK_PATH" "/System/Library/Frameworks" | ||
]; | ||
|
||
doCheck = true; | ||
checkInputs = [ unittest2 ]; |
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.
checkInputs = [ unittest2 ]; | |
checkInputs = [ unittest2 ] ++ lib.optionals stdenv.isDarwin [ psutil ]; |
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'm sorry, I didn't realize nixpkgs-review
runs build in a sandbox. 2.7 build succeeded there only because it was already built without sandbox during my testing.
On Darwin with sandbox all builds (2.7, 3.7, 3.8) fail in the same way, even if I add psutil
to checkInputs
. Do you happen to know if sandbox on Darwin is reliable and endorsed? Should I dig deeper to make these builds work there?
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.
OfBorg built packages on Darwin just fine, so I'm guessing these failures have something to do with my env.
@GrahamcOfBorg build python27Packages.glances python37Packages.glances python38Packages.glances |
please squash commits
|
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 cannot test Darwin changes (that's why I didn't reply yet, but as maintainer I probably should do it anyway) but the diff LGTM.
So basically ACK (once squashed) and my thanks to the reviewers :)
3e43f5b
to
93dc12a
Compare
@jonringer sorry for the ping, I know this is far from the only PR where a review is requested from you — I just wanted to get an idea of when you think you'll have time to take a look at it again? These are the same changes you've reviewed before, just all squashed into one commit. I'm hoping that with yours and primeos' approval it will be clear that it's ready to be merged for when whoever has time to do that comes along. |
sorry, been busy with real life obligations |
No worries, hope everything is alright! |
pythonPackages.glances: fix darwin build
Motivation for this change
Currently
glances
builds only on Linux due to unconditional dependency onhddtemp
(which supports only Linux).These changes also fix IP plugin init failure (which was reported and fixed upstream) and nix-specific segfault due to CoreFoundation mismatch.
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)