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
stdenv: introduce isBootstrap for conditionals #43439
Conversation
This is useful for conditionals like optional dependencies that we don't need when bootstrapping the stdenv, reducing the set of build time dependencies that are required for a full rebuild.
Success on aarch64-linux (full log) Attempted: stdenv Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: stdenv Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: stdenv Partial log (click to expand)
|
I think we avoid generic conditionals like this as much as possible. I’m worried that this could be abused too easily (of course something similar is already basically being used for a few things through Maybe there are good uses of this though. @LnL7 do you have a specific place where this could be used? I guess it may be better than things there now like cmakeBoot, fetchurlBoot, etc. /cc @Ericson2314 |
Yeah I'm sort of thinking the same thing. I really want to redo the bootstrapping by 18.09 into just two changes, would would change everything anyways. |
I think there are 2 different cases for bootstrap overrides.
Do we want the stdenv stages to handle both? The first case is simple since it's a requirement, the second is not but we still want to avoid those to avoid rebuilding dependencies that are never used. The amount of packages the darwin stdenv depends on is significantly larger so it's easier for dependencies to sneak in there. |
Here's a good example 2badf9a, libffi is part of the stdenv so this pulls in a bunch of new dependencies. |
Ok good catch. Can we just disable libffi tests in pkgs/stdenv/darwin overrides? We could even break all of these into an My thinking on this is basically that we don't want packages to know anything about the bootstrapping process. They can have flags that are only turned on in bootstrapping but they should only be about things the package would already know about (doCheck, disable ncurses, use this package version, etc.) |
An alternative I've been thinking about is making the allowed set of packages strict somehow, to make introducing dependencies explicit. |
What is the status of this pull request? |
Thank you for your contributions.
|
If I read this correctly there's not much consensus on this, and it doesn't look like anything's going to happen with this. Please re-open or make a new PR if you still want to pursue this. |
Motivation for this change
This is useful for conditionals like optional dependencies that we don't
need when bootstrapping the stdenv, reducing the set of build time
dependencies that are required for a full rebuild.
On darwin it's even easier to pollute the stdenv build closure with extra dependencies because of cmake, python, etc.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)