about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-12-06 18:51:29 +0100
committerNaïm Favier <n@monade.li>2023-01-01 14:10:42 +0100
commit4df10debe79feba975631347b25f8699b7cd3554 (patch)
tree3cd1f3f4b24aafa356744fb946cccbdbaa47d262 /doc
parent2c83122c1877b20728c8ae97faddbf2166f105cb (diff)
lib/customisation.overrideDerivation: propagate evaluation condition
The new derivation should evaluate only if the old derivation does.

Sadly this means that the old derivation cannot depend on the new one
any more, which was used by xorgserver on Darwin. But this is not a
problem as `overrideAttrs` can (and should) usually be used instead.

This change allowed catching an invalid `meta.platforms` in the linux_rpi
kernels, which use `overrideDerivation`.
Diffstat (limited to 'doc')
-rw-r--r--doc/using/overrides.chapter.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/using/overrides.chapter.md b/doc/using/overrides.chapter.md
index 1c51d27ecedc1..198b4504197db 100644
--- a/doc/using/overrides.chapter.md
+++ b/doc/using/overrides.chapter.md
@@ -63,7 +63,7 @@ You should prefer `overrideAttrs` in almost all cases, see its documentation for
 :::
 
 ::: {.warning}
-Do not use this function in Nixpkgs as it evaluates a Derivation before modifying it, which breaks package abstraction and removes error-checking of function arguments. In addition, this evaluation-per-function application incurs a performance penalty, which can become a problem if many overrides are used. It is only intended for ad-hoc customisation, such as in `~/.config/nixpkgs/config.nix`.
+Do not use this function in Nixpkgs as it evaluates a derivation before modifying it, which breaks package abstraction. In addition, this evaluation-per-function application incurs a performance penalty, which can become a problem if many overrides are used. It is only intended for ad-hoc customisation, such as in `~/.config/nixpkgs/config.nix`.
 :::
 
 The function `overrideDerivation` creates a new derivation based on an existing one by overriding the original's attributes with the attribute set produced by the specified function. This function is available on all derivations defined using the `makeOverridable` function. Most standard derivation-producing functions, such as `stdenv.mkDerivation`, are defined using this function, which means most packages in the nixpkgs expression, `pkgs`, have this function.