-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
RFC: Force "dev" output in case of static builds #83793
base: master
Are you sure you want to change the base?
Conversation
Static builds propagate all buildInputs resulting in a `nix-support/propagated-build-inputs` for nearly every package, retaining references to the entire build-closure. To avoid this, one needs to add "dev" outputs to the package. This commit forces "dev" outputs in case of static builds. That is, static builds will fail to build without a functioning "dev" output. This will break packages that require the `propagated-build-inputs` file in the main output. An example here are Python packages. NixOS#83667
Yes I think this is the natural and correct solution---if a big pill to swallow---for this. If we only do it when there are propagated deps, I think it will be safer, and something we can eventually do in all of nixpkgs.
This is interesting. We can in fact put the file in the |
How to handle cases where different packages propagate different versions of a library, e.g. |
@FRidh I am not sure that is a new problem: if you depend on an exe that link openssl, you shouldn't be getting that package's |
Perhaps a stupid suggestion, but: what would happen if we put the |
@michaelpj to be clear, that file does go in |
This whole |
If we do this, I'd like to do a run of |
This comment has been minimized.
This comment has been minimized.
I marked this as stale due to inactivity. → More info |
It might be nice to still do this? |
I marked this as stale due to inactivity. → More info |
Ping @FRidh, would be nice to have, if you have any appetite to pick this up. |
Static builds propagate all buildInputs resulting in a
nix-support/propagated-build-inputs
for nearly every package,retaining references to the entire build-closure. To avoid this, one
needs to add "dev" outputs to the package.
This commit forces "dev" outputs in case of static builds. That is,
static builds will fail to build without a functioning "dev" output.
This will break packages that require the
propagated-build-inputs
filein the main output. An example here are Python packages.
#83667
Note I don't immediately intend to merge this, its just to further the discussion.
Motivation for this change
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)