summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorCharles Strahan <charles@cstrahan.com>2016-10-26 14:01:13 -0400
committerGitHub <noreply@github.com>2016-10-26 14:01:13 -0400
commitca2b03439f31dca0beee0d9b492dd18db78315cd (patch)
tree0e3a3830d1b797735f786c6ffce9c4e6ebe397e5 /doc
parent6f1f1d86c1f6a82b44099d744cc52d150321e07e (diff)
parent3ca3b145ead9ce528b6b8cbf4db8e2a73a26bbe7 (diff)
downloadnixpkgs-ca2b03439f31dca0beee0d9b492dd18db78315cd.tar
nixpkgs-ca2b03439f31dca0beee0d9b492dd18db78315cd.tar.gz
nixpkgs-ca2b03439f31dca0beee0d9b492dd18db78315cd.tar.bz2
nixpkgs-ca2b03439f31dca0beee0d9b492dd18db78315cd.tar.lz
nixpkgs-ca2b03439f31dca0beee0d9b492dd18db78315cd.tar.xz
nixpkgs-ca2b03439f31dca0beee0d9b492dd18db78315cd.tar.zst
nixpkgs-ca2b03439f31dca0beee0d9b492dd18db78315cd.zip
Merge pull request #19496 from Ericson2314/overridePackages
Make `overridePackages` extend rather than replace existing overrides
Diffstat (limited to 'doc')
-rw-r--r--doc/functions.xml14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/functions.xml b/doc/functions.xml
index 908e9571ed6..e767d01d843 100644
--- a/doc/functions.xml
+++ b/doc/functions.xml
@@ -52,6 +52,20 @@ in ...</programlisting>
     It's equivalent to <varname>pkgs</varname> in the above example.
   </para>
 
+  <para>
+    Note that in previous versions of nixpkgs, this method replaced any changes from <link 
+    linkend="sec-modify-via-packageOverrides">config.packageOverrides</link>,
+    along with that from previous calls if this function was called repeatedly.
+    Now those previous changes will be preserved so this function can be "chained" meaningfully.
+    To recover the old behavior, make sure <varname>config.packageOverrides<varname> is unset,
+    and call this only once off a "freshly" imported nixpkgs:
+
+    <programlisting>let
+  pkgs = import &lt;nixpkgs&gt; { config: {}; };
+  newpkgs = pkgs.overridePackages ...;
+in ...</programlisting>
+  </para>
+
 </section>
 
 <section xml:id="sec-pkg-override">