diff options
Diffstat (limited to 'nix/default.nix')
-rw-r--r-- | nix/default.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nix/default.nix b/nix/default.nix index e6102cf..2a7792a 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,7 +1,7 @@ { pkgs, self }: let - revision = "${self.lastModifiedDate}-${self.shortRev or "dirty"}"; - version = "unstable-${self.shortRev or "dirty"}"; + revision = "${self.lastModifiedDate}-${self.shortRev or self.dirtyShortRev or "dirty"}"; + version = self.shortRev or self.dirtyShortRev or "unstable-${self.lastModified}"; mkDocker = server: let PORT = 3000; @@ -63,7 +63,7 @@ rec { ${builder}/bin/build ''; modules = ./gomod2nix.toml; - ldflags = [ "-s" "-w" ]; + ldflags = [ "-s" "-w" "-X" "main.Commit=${version}" ]; }; docker = mkDocker server; docker-aarch64-linux = mkDocker (self.packages.aarch64-linux.server); |