mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
packaging: Add patch count to version
(cherry picked from commit 0dbe28ad9d
)
This commit is contained in:
parent
a4641be4e9
commit
bfb6f37b37
1 changed files with 5 additions and 0 deletions
|
@ -100,6 +100,11 @@ let
|
||||||
{
|
{
|
||||||
sourceRoot = "${finalScope.patchedSrc.name}/" + workDirSubpath;
|
sourceRoot = "${finalScope.patchedSrc.name}/" + workDirSubpath;
|
||||||
src = finalScope.patchedSrc;
|
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.
|
# Clear what `derivation` can't/shouldn't serialize; see prevAttrs.workDir.
|
||||||
fileset = null;
|
fileset = null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue