diff options
author | Emery Hemingway <ehmry@posteo.net> | 2024-05-30 09:21:09 +0300 |
---|---|---|
committer | Emery Hemingway <ehmry@posteo.net> | 2024-05-30 08:12:39 +0000 |
commit | 5b321ac6b3acbfa5c8458ee3701db18d530f3a17 (patch) | |
tree | 07101d759c1e0267757b2eef88784a03e06b0f99 /doc | |
parent | 9ff0a5bb349480c2f56ee9b66ec0c358c035d12e (diff) |
nimOverrides: do not pass final attrset to override funcs
The final attrset is not used by any of the overrides and presents a infinite recursion hazard. Performance of buildNimPackage is improved.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/languages-frameworks/nim.section.md | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/doc/languages-frameworks/nim.section.md b/doc/languages-frameworks/nim.section.md index c6ebf49b83f66..c9e5c51e530e3 100644 --- a/doc/languages-frameworks/nim.section.md +++ b/doc/languages-frameworks/nim.section.md @@ -80,7 +80,6 @@ For example, to propagate a dependency on SDL2 for lockfiles that select the Nim /* … */ sdl2 = lockAttrs: - finalAttrs: { buildInputs ? [ ], ... }: { buildInputs = buildInputs ++ [ SDL2 ]; @@ -89,9 +88,8 @@ For example, to propagate a dependency on SDL2 for lockfiles that select the Nim } ``` -The annotations in the `nim-overrides.nix` set are functions that take three arguments and return a new attrset to be overlayed on the package being built. +The annotations in the `nim-overrides.nix` set are functions that take two arguments and return a new attrset to be overlayed on the package being built. - lockAttrs: the attrset for this library from within a lockfile. This can be used to implement library version constraints, such as marking libraries as broken or insecure. -- finalAttrs: the final attrset passed by `buildNimPackage` to `stdenv.mkDerivation`. - prevAttrs: the attrset produced by initial arguments to `buildNimPackage` and any preceding lockfile overlays. ### Overriding an Nim library override {#nim-lock-overrides-overrides} |