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
setup-hooks/multiple-outputs.sh: fallback to REMOVE if out isn't in outputs #109599
Conversation
…utputs Typically out is in outputs, but for split packages it's not. In that case maintainer should handle outputs themself, so fallback removing default outputs. Fix NixOS#16182
I'm not sure what you mean by "split packages". I guess some practical examples would help. I think it's been very rare in nixpkgs not to have $out. One reason is that it's where typical $PREFIX goes (many tools have some notion like that). I'm not sure about your use cases, but why REMOVE as the added fallback? Off the top of my head, I'd expect the first output to be a better choice, which could be done (I think) simply by |
"split packages" is a derivation contains many commands, such as those in
They're rare and mostly standalone commands without libs, so typical $PREFIX and the multiple-outputs.sh fixup are in fact meaningless in such cases. There is a trick to solve it by keeping The REMOVE-fallback solution isn't nice I admit, so it's made drafted. I hope we could find a better way to disable all those directory mangling hooks. |
I’d like this change, since it removes a slight annoyance, but I can’t really help with implementing it. |
Problem is that it might break some things, and it’s hard to predict what will break if we change this now. |
Does REMOVE mean silently remove? That sounds bad. I rather have it error. |
Nothing in the current or planned PR should change cases where AFAIK |
Close this since I'm not plan to go further. Hope some one could fix it in the future. |
Motivation for this change
Typically out is in outputs, but for split packages it's not. In that case maintainer should handle outputs themself, so fallback removing default outputs.
This could also avoid the
touch $out
trick.Fix #16182
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)