From b3a723dff1b0a5fce2c4a46a3bb6d2895367b99b Mon Sep 17 00:00:00 2001 From: Jens Binkert Date: Tue, 18 Jun 2024 11:56:45 +0200 Subject: [PATCH] Set version flag --- pkgs/servers/spicedb/default.nix | 4 ++++ pkgs/servers/spicedb/zed.nix | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/pkgs/servers/spicedb/default.nix b/pkgs/servers/spicedb/default.nix index 5b1f982216a3..412f8d4de2e9 100644 --- a/pkgs/servers/spicedb/default.nix +++ b/pkgs/servers/spicedb/default.nix @@ -17,6 +17,10 @@ buildGoModule rec { vendorHash = "sha256-pqHDSQQMvfas9yeyhs5cWokBPISQygz2aHf6W5Zc+co="; + ldflags = [ + "-X 'github.com/jzelinskie/cobrautil/v2.Version=${src.rev}'" + ]; + subPackages = [ "cmd/spicedb" ]; meta = with lib; { diff --git a/pkgs/servers/spicedb/zed.nix b/pkgs/servers/spicedb/zed.nix index 5b6e9d24e114..efe77289040c 100644 --- a/pkgs/servers/spicedb/zed.nix +++ b/pkgs/servers/spicedb/zed.nix @@ -16,6 +16,10 @@ buildGoModule rec { vendorHash = "sha256-Z6j4w4/anfK0ln2MvgnwZFoe8BA5jVHG3g9m2TynmmE="; + ldflags = [ + "-X 'github.com/jzelinskie/cobrautil/v2.Version=${src.rev}'" + ]; + meta = with lib; { description = "Command line for managing SpiceDB"; mainProgram = "zed";