-
-
Notifications
You must be signed in to change notification settings - Fork 14.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
cmake: check if NIX_CC exists before using it #192943
Conversation
13b0800
to
7bec82f
Compare
It seems this could fix the problem I've just encountered. When I call
Things work when I set I'm not testing this PR due to high number of rebuilds :-(. |
I managed to test this PR. I built just cmake and verified that manual |
pkgs/development/tools/build-managers/cmake/001-search-path.diff
Outdated
Show resolved
Hide resolved
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.
The fix looks good. Thank you!
Thanks for the patch and the reviews! I can confirm this fixes my issue on my M1 Mac! Thanks! Would it make sense to backport this to 22.05? |
The run-time libc detection was added after 22.05 in #181431. Here's the simpler patch currently in 22.05, which doesn't have the new checks: https://github.com/NixOS/nixpkgs/blob/nixos-22.05/pkgs/development/tools/build-managers/cmake/search-path.patch I don't think #181431 should be backported, so this shouldn't be either. Though, should we be targeting staging for this, considering the Darwin rebuilds? |
Yup, this needs to target |
workaround for cmake bug in nix details: NixOS/nixpkgs#192943
Description of changes
Due to the patch added by us,
cmake
package does not work whenNIX_CC
environment variable does not exists.When
$ENV{NIX_CC}
is empty, the conditionIS_DIRECTORY AND EXISTS /nix-support/orig-libc AND EXISTS /nix-support/orig-libc-dev
is invalid.nixpkgs/pkgs/development/tools/build-managers/cmake/001-search-path.diff
Lines 24 to 34 in e17b079
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes