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
doc/stdenv: how to mkDerivation with no srcs #23971
Conversation
@chris-martin, 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 this rather belongs into the general part describing phases, as one may want to disable others as well. There is hint that you can override whole phases, so I imagine we might add that it's often useful to disable individual phases by |
unpacked or copied. One of these must be set. To make a | ||
derivation with no sources, you can avoid this requirement by | ||
setting <literal>unpackPhase = "true";</literal> to replace the | ||
default unpack phase with a noop.</para></listitem> |
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.
Or just use runCommand
?
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.
Yes, that's the usual approach if you want to get rid of all phases.
However we fix it, the statement
must be qualified in some way, because right now it's flatly untrue? It's only true if you're using the default unpack phase. |
I suppose we could also add a hint to the error message that you get when you don't specify |
Anything related to a phase is void if you disable that phase or exchange its code – I'd think that doesn't need mentioning explicitly. |
I think user-friendly documentation explicitly addresses particular problems that people are likely to run into, in the specific place where they're likely to look for the solution - rather than requiring everyone to read the entire manual and having a complete understanding of how everything comes together. |
@copumpkin Can you elaborate? I'll be happy to update the PR to suggest it, but I don't really know what "just use |
4b9f7a4
to
e19c47d
Compare
There is |
It sounds like the consensus is that |
mkDerivation without unpack phase is still useful because of its fixup phase: https://github.com/nixos-users/wiki/wiki/General-recommendations#package-simple-custom-scripts |
I don't know, I've lost all energy on this PR, it seems like an uphill battle. |
Copying the lesson learned from #23099 into the manual.