Add build version indicator to sidebar menu

Display commit date and short hash (e.g., "2026-01-08 fb59ef7") below
the ANIMALTRACK title in the sidebar. In development, reads from git
directly; in Docker, reads from BUILD_DATE/BUILD_COMMIT env vars
injected at build time from the Nix flake.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-08 10:36:44 +00:00
parent fb59ef72a8
commit 5c12eb553c
4 changed files with 46 additions and 3 deletions

View File

@@ -67,7 +67,12 @@
in
{
packages.${system} = {
dockerImage = import ./docker.nix { inherit pkgs pythonEnv python; };
dockerImage = let
buildDate = let
d = self.lastModifiedDate or "00000000000000";
in "${builtins.substring 0 4 d}-${builtins.substring 4 2 d}-${builtins.substring 6 2 d}";
buildCommit = self.shortRev or self.dirtyShortRev or "unknown";
in import ./docker.nix { inherit pkgs pythonEnv python buildDate buildCommit; };
};
devShells.${system}.default = pkgs.mkShell {