git.iko.soy/typeable/nixpkgs
on master help sign in
Reduce verbosity of packageOverride docs further
commit018062529aca9b83a6b03db163d121a8bd25ce01 authorSebastian Jordan <sebastian.jordan.mail@googlemail.com> dateMon 20 Apr 2015, 23:09 (12 years ago) parent20dadec
1 file changed+12−8
doc/packageconfig.xml+12−8
doc/packageconfig.xml+12−8
@@ -67,16 +67,20 @@
6767 <filename>lib/licenses.nix</filename> of the nix package tree.
6868 </para>
6969
70−<section><title>Modify packages via<literal>packageOverrides</literal></title>
70+<section><title>Modify packages via <literal>packageOverrides</literal></title>
7171
7272<para>
73− <filename>~/.nixpkgs/config.nix</filename> enables the user to
74− override package names without creating a fork of Nixpkgs. This is
75− accomplished by defining a function called
76− <varname>packageOverrides</varname>. It is expected to take the set
77− of packages, usually called <varname>pkgs</varname>, and returns a
78− modified set of packages. It is called when evaluating any nix
79− expression in the <varname>pkgs</varname> set.
73+
74+ You can define a function called <varname>packageOverrides</varname>
75+ in your local <filename>~/.nixpkgs/config</filename> to overide nix
76+ packages. It must be a function that takes pkgs as an argument and
77+ return modified set of packages.
78+
79+ <programlisting>{
80+ packageOverrides = pkgs: rec {
81+ foo = pkgs.foo.override { ... };
82+ };
83+}</programlisting>
8084</para>
8185</section>
8286