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
nixpkgs manual: advise against overriding whole phases #26345
Conversation
I've seen that mistake at least a few times already, e.g. NixOS#26209 (comment) It might perhaps seem counter-intuitive if one doesn't know nixpkgs well.
@vcunat, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @Ericson2314 and @pSub to be potential reviewers. |
I think the problem with Qt5 would be rather avoided by adding |
Right, that certainly seems less risky in this respect. I guess @ttuegel knows best this stuff. |
Then you have the same problem whenever someone overrides |
No, changing Yes, you now get screwed if a package specifies |
May I suggest to change the default builder in this respect. tl;dr; I think hooks should not be part of the phase, and should not be explicitly overriden if need be. |
latter is convenient from a build script.</para> | ||
latter is convenient from a build script. | ||
|
||
However, typically one only wants to <emphasis>add</emphasis> some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, yes, but what if I really want to replace the default phase behavior, but keep the hooks. We should really explain that.
doc/stdenv.xml also contains this example:
If redefining |
Something weird happened. Apparently I did not post this message: I have a working update to setup.sh that implements my above proposition in layus@66a2bde To test on only one package, you will need overrideSetup from pkgs/stdenv/adapters.nix. |
@dezgeg Oh, I understand now. Yes, I think that would be the most appropriate solution for the Qt 5 setup hooks. And I agree that although this may break packages that set |
Seems pretty good, reminds me of this very unfortunate bit in the nixpkgs manual (a similar bit is in the nix manual) too:
|
I've seen that mistake at least a few times already, e.g.
#26209 (comment)
It might perhaps seem counter-intuitive if one doesn't know nixpkgs well.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
= none)