Repository navigation
treewide: Remove crossConfig and add strictDeps - #40529
Conversation
The hack of using `crossConfig` to enforce stricter handling of dependencies is replaced with a dedicated `strictDeps` for that purpose. (Experience has shown that my punning was a terrible idea that made more difficult and embarrising to teach teach.) Now that is is clear, a few packages now use `strictDeps`, to fix various bugs: - bintools-wrapper and cc-wrapper
All its uses have been removed.
|
A bit late to the show. I'm obviously happy with this, though I don't find the name |
| cmakeFlags="-DCMAKE_CXX_COMPILER=$CXX $cmakeFlags" | ||
| cmakeFlags="-DCMAKE_C_COMPILER=$CC $cmakeFlags" | ||
| cmakeFlags="-DCMAKE_AR=$(command -v $AR) $cmakeFlags" | ||
| cmakeFlags="-DCMAKE_RANLIB=$(command -v $RANLAB) $cmakeFlags" |
There was a problem hiding this comment.
Typo.
Also these are now being set in native builds which doesn't seem very desirable.
There was a problem hiding this comment.
Thanks you for the catch.
| , doInstallCheck ? config.doCheckByDefault or false | ||
|
|
||
| , crossConfig ? null | ||
| , # TODO(@Ericson2314): Make always true and remove |
There was a problem hiding this comment.
There is no business having these sorts of TODO comments until it's accepted (via an RFC) that it will be done.
| userHook = config.stdenv.userHook or null; | ||
| __ignoreNulls = true; | ||
|
|
||
| inherit strictDeps; |
There was a problem hiding this comment.
This bloats every derivation with a yet another extra field and makes mkDerivation slower. This is explicitly discouraged.
|
@LnL7 hmm I thought cmake stuff ignored extra |
|
Preliminarily fixed both CMake problems and building Darwin stdenv right now. |
|
@srhb well, saner name doesn't get me out of the obligation of actually documenting this in the manual! |
|
Haha oops sorry re:revert on my random branch O:). Already dropped it on that branch, but the mention lives on! Silly github. |
|
@dtzWill Ah no worries. I see that it was your own branch from the get go. And, FWIW since I did break staging, anyone would have full right to revert this PR on it too per the official policy, IIRC. So I couldn't complain in that case either :). |
Motivation for this change
Fix #40531
One exception to the
crossConfigusage being old I did in 469fd89, using it control how flexible/rigid our handling of dependencies is. Instead of punning oncrossConfig, we add astrictDepswhich is by default just true forhostPlatform != buildPlatform. This means in packages that always need strict deps, we can dostrictDeps = trueinstead of the far more confusingcrossConfig = true.Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)CC @srhb @TravisWhitaker