@@ -42,29 +42,30 @@ construction, so without them,
42elements.)</para>
42elements.)</para>
44<para>Even greater customisation is possible using the function
44<para>Even greater customisation is possible using the function
45−<varname>overrideDerivation</varname>. While the
45+<varname>overrideAttrs</varname>. While the
46<varname>override</varname> mechanism above overrides the arguments of
46<varname>override</varname> mechanism above overrides the arguments of
47−a package function, <varname>overrideDerivation</varname> allows
47+a package function, <varname>overrideAttrs</varname> allows
48−changing the <emphasis>result</emphasis> of the function. This
48+changing the <emphasis>attributes</emphasis> passed to <literal>mkDerivation</literal>.
49−permits changing any aspect of the package, such as the source code.
49+This permits changing any aspect of the package, such as the source code.
50For instance, if you want to override the source code of Emacs, you
50For instance, if you want to override the source code of Emacs, you
53<programlisting>
53<programlisting>
54−environment.systemPackages =
54+environment.systemPackages = [
55− [ (pkgs.lib.overrideDerivation pkgs.emacs (attrs: {
55+ (pkgs.emacs.overrideAttrs (oldAttrs: {
56− name = "emacs-25.0-pre";
56+ name = "emacs-25.0-pre";
57− src = /path/to/my/emacs/tree;
57+ src = /path/to/my/emacs/tree;
60</programlisting>
60</programlisting>
62−Here, <varname>overrideDerivation</varname> takes the Nix derivation
62+Here, <varname>overrideAttrs</varname> takes the Nix derivation
63specified by <varname>pkgs.emacs</varname> and produces a new
63specified by <varname>pkgs.emacs</varname> and produces a new
64derivation in which the original’s <literal>name</literal> and
64derivation in which the original’s <literal>name</literal> and
65<literal>src</literal> attribute have been replaced by the given
65<literal>src</literal> attribute have been replaced by the given
66+values by re-calling <literal>stdenv.mkDerivation</literal>.
66−values. The original attributes are accessible via
67+The original attributes are accessible via the function argument,
67−<varname>attrs</varname>.</para>
68+which is conventionally named <varname>oldAttrs</varname>.</para>
69<para>The overrides shown above are not global. They do not affect
70<para>The overrides shown above are not global. They do not affect
70the original package; other packages in Nixpkgs continue to depend on
71the original package; other packages in Nixpkgs continue to depend on