mirror of
https://github.com/NixOS/nix
synced 2025-07-08 19:23:54 +02:00
Add date of last commit to SourceInfo
This is primarily useful for version string generation, where we need a monotonically increasing number. The revcount is the preferred thing to use, but isn't available for GitHub flakes (since it requires fetching the entire history). The last commit timestamp OTOH can be extracted from GitHub tarballs.
This commit is contained in:
parent
479757dc15
commit
0f840483c7
7 changed files with 61 additions and 30 deletions
|
@ -19,7 +19,8 @@ let
|
|||
releaseTools.sourceTarball {
|
||||
name = "nix-tarball";
|
||||
version = builtins.readFile ./.version;
|
||||
versionSuffix = if officialRelease then "" else "pre${toString nix.revCount or 0}_${nix.shortRev or "0000000"}";
|
||||
versionSuffix = if officialRelease then "" else
|
||||
"pre${if nix ? lastModified then builtins.substring 0 8 nix.lastModified else toString nix.revCount or 0}_${nix.shortRev or "0000000"}";
|
||||
src = nix;
|
||||
inherit officialRelease;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue