make-tarball.nix: support an absent revcount

When run out of a tarball, it is possible for revCount to be missing.

(cherry picked from commit e1de9a317d)
This commit is contained in:
Graham Christensen
2023-05-28 22:30:53 -04:00
committed by github-actions[bot]
parent f7c1500e2e
commit 8801913fc2

View File

@@ -19,7 +19,7 @@ pkgs.releaseTools.sourceTarball {
versionSuffix = "pre${
if nixpkgs ? lastModified
then builtins.substring 0 8 (nixpkgs.lastModifiedDate or nixpkgs.lastModified)
else toString nixpkgs.revCount}.${nixpkgs.shortRev or "dirty"}";
else toString (nixpkgs.revCount or 0)}.${nixpkgs.shortRev or "dirty"}";
buildInputs = with pkgs; [ nix.out jq lib-tests brotli ];