-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
make-derivation: install all outputs #44168
Conversation
This confuses users too much and to me seems to have very little benefit. Since it only effect “declarative” installation, it doesn’t seem helpful to not give every output available. In this case, users want what would normally be included in the /zlib/ package, not just one output. Fixes NixOS#44144 Fixes NixOS#24717
@GrahamcOfBorg eval |
I think this should be brought up on the mailing list. |
This will regress closure sizes since now anything in Regarding #44144, compiling outside nix-shell isn't really supported anyway. As for having manpages installed by |
Doesn't systemPackages use
Yes, I think for most of us this would be the ideal solution. I still think we would want the default behavior of that function to be install everything. Most beginners to Nix will not understand multiple outputs, or pathsToLink, etc. They will just assume Nix(pkgs) does not provide info pages, man pages, headers, libraries, etc. I want to make sure we can still provide good support for the imperative package installation style, even if most NixOS/Nixpkgs core contributors are using something else. |
@GrahamcOfBorg eval |
It uses
No, it's going to be hundreds of megs if some package's
For development nearly nothing currently supports that since setup hooks won't be run. And most likely isn't going to be fixed without a major redesign. |
This restores the behavior in buildEnv to before ddf58a1, where outputsToInstall only pointed to one output. ddf58a1 expanded this to include all outputs. Installing all outputs is desired in ‘nix-env -iA’ where there is no way to configure what is installed, but not so much in buildEnv where it is possible to configure extraOutputsToInstall to add additional outputs (this is already done in NixOS).
This doesn't just apply to headers & libraries. Things like man pages are now frequently missing when someone decides to add a separate output for it. Not everyone is installing their packages through I have added a commit to restore the buildEnv behavior. I agree that it makes sense to only use one output in buildEnv's case because it can be configured to add more outputs by the user. |
Ah, cross-link: 3342f71#commitcomment-29875048 |
If we need to do this without any changes to nix-env we could perhaps retcon |
s/propagatedUserEnvPackages/propagatedUserEnvPkgs/ The only usage I found was in buildenv.pl. I would be interested in whether there are any others. Do you think it makes sense to leave the outputsToInstall uses in packages the same?
It's definitely preferable, but could take a long time. The goal for me is to find some solution for #24717 before 18.09 release. If someone wants to step up and create a PR to Nix to use a custom buildEnv, that would be great but I am not counting on it. Because @vcunat is assigned #24717, I kind of want to see what he thinks of this PR. After the update to have buildEnv calculate outputsToInstall itself, I am hoping it addresses some concerns. This whole thing has been an outstanding issue for too long IMO. I definitely get that things like |
I haven't noticed extraneous (unused) outputs being downloaded; that would be a bug. (Unless e.g. the usual case that |
Closing in favor of #35884 for now. |
This confuses users too much and the old behavior to me seems
to have very little benefit. Since it only effect “declarative” installation,
it doesn’t seem helpful to not give every output available. In this case, users
want what would normally be included in the /zlib/ package, not just
one output. Individual packages can still specify what outputs to install
with
meta.outputsToInstall
.Fixes #44144
Fixes #24717