From 43decdc877a9e8547a87ad88d090b607678f806f Mon Sep 17 00:00:00 2001 From: Peter Romfeld Date: Tue, 17 Oct 2023 17:01:39 +0800 Subject: [PATCH] vcluster: fix version output --- pkgs/applications/networking/cluster/vcluster/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/vcluster/default.nix b/pkgs/applications/networking/cluster/vcluster/default.nix index af0642c14c5c..f574daedde03 100644 --- a/pkgs/applications/networking/cluster/vcluster/default.nix +++ b/pkgs/applications/networking/cluster/vcluster/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: +{ lib, go, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "vcluster"; @@ -17,7 +17,11 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; - ldflags = [ "-s" "-w" ]; + ldflags = [ + "-s" "-w" + "-X main.version=${version}" + "-X main.goVersion=${lib.getVersion go}" + ]; # Test is disabled because e2e tests expect k8s. doCheck = false;