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
[staging-next] libtiff: fix build on darwin #110729
Conversation
Now that libtiff is using cmake, we need to let cmake set the build rpath for the tests to pass on darwin. The rpaths are rewritten at installation so the output libraries should be unaffected.
cmakeFlags = if stdenv.isDarwin then [ | ||
"-DCMAKE_SKIP_BUILD_RPATH=OFF" | ||
] else null; |
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.
cmakeFlags = if stdenv.isDarwin then [ | |
"-DCMAKE_SKIP_BUILD_RPATH=OFF" | |
] else null; | |
cmakeFlags = lib.optionals stdenv.isDarwin [ | |
"-DCMAKE_SKIP_BUILD_RPATH=OFF" | |
]; |
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 did this to avoid the rebuild on linux. With this change lib.optionals will evaluate to an empty list rather than null on linux and cause a rebuild.
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 am personally not a big fan of such tricks but if it takes to long to rebuild on staging-next then I guess it it is fine.
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.
How about I subsequently issue a PR against staging to make the BUILD_RPATH unconditional? Then this check will only be in place until the next staging-next merge, and the mass rebuild will be "free" alongside other mass rebulid commits in staging
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 am not sure if this is worth the effort.
Now that libtiff is using cmake, we need to let cmake
set the build rpath for the tests to pass on darwin.
The rpaths are rewritten at installation so
the output libraries should be unaffected.
(This won't be needed anymore if we eventually merge #108496)
Motivation for this change
#92708 (cc @L-as)
#110569 (cc @FRidh)
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)