about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/qbec
diff options
context:
space:
mode:
authorGreg Roodt <greg@canva.com>2020-06-15 20:51:21 +1000
committerGreg Roodt <greg@canva.com>2020-06-16 07:16:12 +1000
commit7304a4ae4ba63220d2974530e37e339c0f00bdbe (patch)
treed0a0889ec3f0ec43a5b275219df2b70f46f77e98 /pkgs/applications/networking/cluster/qbec
parent448a27759eea51b2d9e9fca82ceeb479f17c10eb (diff)
qbec: add ldflags
Diffstat (limited to 'pkgs/applications/networking/cluster/qbec')
-rw-r--r--pkgs/applications/networking/cluster/qbec/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/applications/networking/cluster/qbec/default.nix b/pkgs/applications/networking/cluster/qbec/default.nix
index 0689fd096b3bc..4118d25d4f769 100644
--- a/pkgs/applications/networking/cluster/qbec/default.nix
+++ b/pkgs/applications/networking/cluster/qbec/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib, go, buildGoModule, fetchFromGitHub }:
 
 buildGoModule rec {
   pname = "qbec";
@@ -13,10 +13,18 @@ buildGoModule rec {
 
   vendorSha256 = "15hbjghi2ifylg7nr85qlk0alsy97h9zj6hf5w84m76dla2bcjf3";
 
+  buildFlagsArray = ''
+    -ldflags=
+      -s -w
+      -X github.com/splunk/qbec/internal/commands.version=${version}
+      -X github.com/splunk/qbec/internal/commands.commit=${src.rev}
+      -X github.com/splunk/qbec/internal/commands.goVersion=${lib.getVersion go}
+  '';
+
   meta = with lib; {
     description = "Configure kubernetes objects on multiple clusters using jsonnet https://qbec.io";
     homepage = "https://github.com/splunk/qbec";
     license = licenses.asl20;
     maintainers = with maintainers; [ groodt ];
   };
-}
\ No newline at end of file
+}