diff options
Diffstat (limited to 'nix/default.nix')
-rw-r--r-- | nix/default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nix/default.nix b/nix/default.nix index 10d52a0..e818c5a 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,6 +1,7 @@ { pkgs, self }: let version = "unstable"; + shortSHA = self.shortRev or self.dirtyShortRev; fullSHA = self.rev or self.dirtyRev; mkDocker = type: { server, website }: let @@ -75,7 +76,14 @@ with pkgs; rec { }; modules = ./gomod2nix.toml; subPackages = [ "cmd/server" ]; - ldflags = [ "-s" "-w" "-X" "main.Commit=${fullSHA}" ]; + ldflags = [ + "-s" + "-w" + "-X" + "main.CommitSHA=${fullSHA}" + "-X" + "main.ShortSHA=${shortSHA}" + ]; }; docker-stream = mkDockerStream { inherit server website; }; docker-stream-aarch64-linux = mkDockerStream { |