mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
packaging: Make patch count lazier
This makes `nix.version` quicker to evaluate, which should speed up package listing operations. If you want an accurate count, use `lib.optionals` in your override instead of `null` values.
This commit is contained in:
parent
0dbe28ad9d
commit
d47e3c9576
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ let
|
|||
src = finalScope.patchedSrc;
|
||||
version =
|
||||
let
|
||||
n = lib.count (p: p != null) finalScope.patches;
|
||||
n = lib.length finalScope.patches;
|
||||
in
|
||||
if n == 0 then finalAttrs.version else finalAttrs.version + "+${toString n}";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue