Skip to content

Commit

Permalink
nixpkgs manual: advise against overriding whole phases
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vcunat committed Jun 3, 2017
1 parent b520c30 commit 8c6fada
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/stdenv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,13 @@ containing some shell commands to be executed, or by redefining the
shell function
<varname><replaceable>name</replaceable>Phase</varname>. The former
is convenient to override a phase from the derivation, while the
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
commands to a phase, e.g. by defining <literal>postInstall</literal>
or <literal>preFixup</literal>, as skipping some of the default actions
may have unexpected consequences.
</para>


<section xml:id="ssec-controlling-phases"><title>Controlling
Expand Down

0 comments on commit 8c6fada

Please sign in to comment.