summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2023-05-28 22:30:53 -0400
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-06-02 13:53:40 +0000
commitb943345ce23c0923d4067842fd1e40b185ee3ae7 (patch)
tree12e6ac707130c4cfd77a1226046717484a31c253
parentMerge pull request #235574 from NixOS/backport-232770-to-release-23.05 (diff)
downloadnixpkgs-b943345ce23c0923d4067842fd1e40b185ee3ae7.tar.gz
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 e1de9a317d5e3ac1a501e25be58e0f617de4d085)
-rw-r--r--pkgs/top-level/make-tarball.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix
index abc121e29dc7..0f1c92be89bc 100644
--- a/pkgs/top-level/make-tarball.nix
+++ b/pkgs/top-level/make-tarball.nix
@@ -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 ];