@@ -54,4 +54,35 @@ in ...</programlisting>
57+<section xml:id="sec-pkg-override">
58+ <title><pkg>.override</title>
61+ The function <varname>override</varname> is usually available for all the
62+ derivations in the nixpkgs expression (<varname>pkgs</varname>).
65+ It is used to override the arguments passed to a function.
70+ <programlisting>pkgs.foo.override { arg1 = val1; arg2 = val2; ... }</programlisting>
71+ <programlisting>pkgs.overridePackages (self: super: {
72+ foo = super.foo.override { barSupport = true ; };
74+ <programlisting>mypkg = pkgs.callPackage ./mypkg.nix {
75+ mydep = pkgs.mydep.override { ... };
80+ In the first example, <varname>pkgs.foo</varname> is the result of a function call
81+ with some default arguments, usually a derivation.
82+ Using <varname>pkgs.foo.override</varname> will call the same function with
83+ the given new arguments.