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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
pillow: Fix build on non-NixOS systems #36323
Conversation
@GrahamcOfBorg pythonPackages.pillow python3Packages.pillow |
Wow, that was fast! Thanks The build now succeeds. It seems like this problem should have been prevented by sandboxing. I thought I have sandboxing enabled ( |
nix 2.0 has a |
|
@Mic92 - Forgive me if I'm mistaken, but did you forget to add the |
@GrahamcOfBorg build pythonPackages.pillow python3Packages.pillow |
Success on x86_64-darwin (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
@@ -31,6 +31,9 @@ buildPythonPackage rec { | |||
++ stdenv.lib.optionals (isPyPy) [ tk libX11 ]; | |||
|
|||
# NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp. | |||
# NOTE: we patch the `disable_platform_guessing` setting here, instead of | |||
# passing the `--disable-platform-guessing` command-line option, since the | |||
# command-line option doesn't work when we run tests. |
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.
Can you also summarize here briefly why, this has to be patched? Basically what you wrote in the commit message.
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.
@Mic92 - Done; amended and force-pushed the commit.
Success on aarch64-linux (full log) Partial log (click to expand)
|
The Pillow install script will, by default, add paths like /usr/lib and /usr/include to the search paths. This can break things when building on a non-NixOS system that has some libraries installed that are not installed in Nix (for example, Arch Linux has jpeg2000 but Nix doesn't build Pillow with this support). We solve this by telling Pillow to knock it off 馃槃 Fixes NixOS#36317
433f904
to
8ad2cb1
Compare
Motivation for this change
The Pillow install script will, by default, add paths like
/usr/lib
and/usr/include
to the search paths. This can break things when buildingon a non-NixOS system that has some libraries installed that are not
installed in Nix (for example, Arch Linux has jpeg2000 but Nix doesn't
build Pillow with this support).
We solve this by telling Pillow to knock it off 馃槃
Fixes #36317
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)cc @timokau