Skip to content

Commit 805ebfb

Browse files
committed
Include lastModifiedDate in Nix flake version
1 parent e55f33e commit 805ebfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
# FIXME: Should use `git describe` to get the version
7272
# number or leave it to cmake, but the .git/ directory
7373
# isn't included in the Nix store.
74-
version = "0.6.3-unknown-" + (if (self ? shortRev) then self.shortRev else "dirty");
74+
version = "0.6.3-${nixpkgs.lib.substring 0 8 self.lastModifiedDate}-${self.shortRev or "dirty"}";
7575
src = nixpkgs.lib.cleanSource ./.;
7676
patchPhase = let
7777
ver = builtins.splitVersion version;
@@ -83,7 +83,7 @@
8383
SET(SUPERTUX_VERSION_MAJOR ${builtins.elemAt ver 0})
8484
SET(SUPERTUX_VERSION_MINOR ${builtins.elemAt ver 1})
8585
SET(SUPERTUX_VERSION_PATCH ${builtins.elemAt ver 2})
86-
SET(SUPERTUX_VERSION_TWEAK )
86+
SET(SUPERTUX_VERSION_TWEAK ${builtins.elemAt ver 3})
8787
SET(SUPERTUX_VERSION_STRING "v${version}")
8888
SET(SUPERTUX_VERSION_BUILD "${builtins.elemAt ver 4}")
8989
EOF

0 commit comments

Comments
 (0)