summary refs log tree commit diff
path: root/doc/stdenv.xml
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2017-06-03 11:24:18 +0200
committerVladimír Čunát <vcunat@gmail.com>2017-06-03 11:24:18 +0200
commit8c6fada372dba386c25e209a4dff440e2da5a0be (patch)
tree84b80eb0bbe611682d7ec8008381d86025bfb1dc /doc/stdenv.xml
parentb520c30d9ece95b8c64caf6691db99d486e08717 (diff)
downloadnixlib-8c6fada372dba386c25e209a4dff440e2da5a0be.tar
nixlib-8c6fada372dba386c25e209a4dff440e2da5a0be.tar.gz
nixlib-8c6fada372dba386c25e209a4dff440e2da5a0be.tar.bz2
nixlib-8c6fada372dba386c25e209a4dff440e2da5a0be.tar.lz
nixlib-8c6fada372dba386c25e209a4dff440e2da5a0be.tar.xz
nixlib-8c6fada372dba386c25e209a4dff440e2da5a0be.tar.zst
nixlib-8c6fada372dba386c25e209a4dff440e2da5a0be.zip
nixpkgs manual: advise against overriding whole phases
I've seen that mistake at least a few times already, e.g.
https://github.com/NixOS/nixpkgs/pull/26209#issuecomment-305925562
It might perhaps seem counter-intuitive if one doesn't know nixpkgs well.
Diffstat (limited to 'doc/stdenv.xml')
-rw-r--r--doc/stdenv.xml8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/stdenv.xml b/doc/stdenv.xml
index a2530e102ca8..6e7134e16a57 100644
--- a/doc/stdenv.xml
+++ b/doc/stdenv.xml
@@ -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