1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

packaging: Add patch count to version

This commit is contained in:
Robert Hensing 2025-02-18 19:01:58 +01:00
parent 03efba30da
commit 0dbe28ad9d

View file

@ -100,6 +100,11 @@ let
{
sourceRoot = "${finalScope.patchedSrc.name}/" + workDirSubpath;
src = finalScope.patchedSrc;
version =
let
n = lib.count (p: p != null) finalScope.patches;
in
if n == 0 then finalAttrs.version else finalAttrs.version + "+${toString n}";
# Clear what `derivation` can't/shouldn't serialize; see prevAttrs.workDir.
fileset = null;