-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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/WIP] multiple-outputs: Change the order of outputs to have binaries in the primary output #14766
Conversation
Hmm, yes, probably. At least in principle, though I haven't thought through many potential consequences yet. I'm not certain how fast I get to this properly. I suppose I'd first solve issues like #14682, as that seems some easily fixable sloppy programming (of mine). |
The general idea here looks good to me. The changes to 👍 |
I forgot to mention, I also approve of having I'd like to see this get pushed along, assuming no one comes along with a reasonable objection. |
I don't have a strong opinion either way, but to new users this would probably be more consistent with Debian and Red Hat-based distributions' |
Agreed, this sounds like a good idea, so better to just deal with any bugs. |
I built |
Doesn't this break
since you would now have to write
? That was the whole reason for putting |
Okay, I see there is some special-casing for this in |
Well, the whole point is to try guessing what output was meant when none was specified... obviously the best guess depends on context. |
Yes, that is pretty much inevitable. Even currently (as in before this PR) Also cases like |
The last one is correct, I believe. The users of |
#14902 seems another victim of silent breakage by accidentally using the |
I don't think there can be any argument against the commits that make output choice explicit (they make majority of the diff). These shouldn't even change hashes and could go to master directly (before conflicts can arise). |
I ran into some issues with this except with libraries defaulting to |
This is a rebase of most commits from #14766, resolving conflicts and a few other evaluation problems.
I suppose we can fixup various details after staging this. I wonder whether to re-consider the default setting of |
Right, I would just like a confirmation from @edolstra if he agrees with this or not. Also @domenkozar might have something to say about one more mass-rebuild thing to 16.09 ;) |
No objections for mass-rebuild if it's done before Thursday and it works (doesn't break too many packages and all tests pass). |
Looks good to me. |
Good. Can you please update release notes about this? Also the dev / devEnv change of ruby. |
There are some more places where .dev needs to be used I think, like for nss nspr gcc glibc glib readline ncurses gio and all these libraries that sometimes are used in build flags of packages. Searching for "-I" might help. |
TODO: Darwin xorgserver should have consistent outputs with the Linux one.
Passing '-I${foo}/lib' to GCC doesn't seem sane.
Oh, and cc @zimbatm for the Ruby change (ba6d94e). Does this rename sound good, or would some other name be better? Reason for changing is that the name Also, any documentation references to update? Didn't notice any but the name |
Looks good. I don't think |
Wow, this is on staging? Awesome work! |
It's in master, actually, since 8c4aeb1. |
(and in 16.09!) |
This series reorders the outputs of each multiple-output splitted package in nixpkgs to have the output that is installed into the user environment be the first one (though I made a single exception:
glibc
has its libraries first to keep usages like${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2
working). Previously thedev
output was typically the primary one, although there were some exceptions like the kernel package. To accommodate this,mkDerivation
was changed to use thedev
output by default in packages passed tobuildInputs
and friends.The rationale for doing this is to avoid breakage to users' scripts and systemd services that reference binaries like
${pkgs.perl}/bin/perl
(e.g. https://github.com/NixOS/nixos-org-configurations/blob/master/delft/common.nix#L62). Currently, those usages will just silently produce a nonsensical path, which IMHO is a significant regression to the pre-multiple-outputs state.Also this should fix some of our in-tree systemd units which suffer from the same issue and avoid the need for changes like 3e38a71
As a part of doing this, I manually eyeballed all usages of
${pkgs.multiout-package}
. I collected this list of packages where the implicitdev
is currently incorrectly used in place of the correct output: https://github.com/dezgeg/nixpkgs/commits/bad-multiout-refs. So this PR fixes some of them as a side-effect (though not all, there are other things wrong as well).Note: I'm still compiling most of this (at least
stdenv
builds...). It's certainly possible thatchooseDevOutputs
needs to be used in more places...cc @edolstra @vcunat @ttuegel @joachifm @lethalman