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
lxqt-build-tools: fix darwin detection #123400
Conversation
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 do not have/use darwin, therefore I cannot test. But it looks good to me.
Could this not have been done with |
Certainly |
I wasn't sure what is preferred. I updated the PR. 👍 |
@GrahamcOfBorg build lxqt-build-tools |
postPatch = lib.optionalString stdenv.isDarwin '' | ||
substituteInPlace cmake/modules/LXQtCompilerSettings.cmake \ | ||
--replace AppleClang Clang | ||
''; |
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.
postPatch = lib.optionalString stdenv.isDarwin '' | |
substituteInPlace cmake/modules/LXQtCompilerSettings.cmake \ | |
--replace AppleClang Clang | |
''; | |
postPatch = '' | |
substituteInPlace cmake/modules/LXQtCompilerSettings.cmake \ | |
--replace AppleClang Clang | |
''; |
Otherwise we might miss it when updating on Linux.
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.
Updated.
I'm now a little worried in general that this kind of substitution may break something when upstream these conditions in the cmake code. Then again, that'll probably result in a broken Darwin build, or even a broken build everywhere. So I guess it's fine?
@ofborg build lxqt.lxqt-build-tools |
Motivation for this change
ZHF: #122042
cc @NixOS/nixos-release-managers
This package detects Darwin via the 'AppleClang' identifier that only applies to Xcode; Nix clang identifies as 'Clang'. This causes dependants to fail linking, for example: https://hydra.nixos.org/build/142959638/nixlog/1
This patch is a stop-gap solution, I think. i don't think it's appropriate to upstream, but I also don't know what the correct solution is.
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)