about summary refs log tree commit diff
path: root/pkgs/top-level/make-tarball.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-05-29 21:28:33 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-02-05 23:14:32 +0100
commit55483974885b1e98fc392c73da93bb90e9204c56 (patch)
treec07cc5f409233458a9e490b53a5456e10d01a806 /pkgs/top-level/make-tarball.nix
parent0f913dee486286c9846135dd857c83d28cc9c315 (diff)
make-tarball.nix: Derive version from lastModified instead of revCount
GitHub flakes don't provide revCount.
Diffstat (limited to 'pkgs/top-level/make-tarball.nix')
-rw-r--r--pkgs/top-level/make-tarball.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix
index 288971403f1af..7bb18e765f17e 100644
--- a/pkgs/top-level/make-tarball.nix
+++ b/pkgs/top-level/make-tarball.nix
@@ -17,7 +17,10 @@ releaseTools.sourceTarball {
 
   inherit officialRelease;
   version = pkgs.lib.fileContents ../../.version;
-  versionSuffix = "pre${toString nixpkgs.revCount}.${nixpkgs.shortRev}";
+  versionSuffix = "pre${
+    if nixpkgs ? lastModified
+    then builtins.substring 0 8 nixpkgs.lastModified
+    else toString nixpkgs.revCount}.${nixpkgs.shortRev}";
 
   buildInputs = [ nix.out jq lib-tests ];