diff --git a/pkgs/applications/networking/cluster/terragrunt/0.9.8.nix b/pkgs/applications/networking/cluster/terragrunt/0.9.8.nix index 54ca1a9d7d0..ec13cbe35bc 100644 --- a/pkgs/applications/networking/cluster/terragrunt/0.9.8.nix +++ b/pkgs/applications/networking/cluster/terragrunt/0.9.8.nix @@ -17,6 +17,10 @@ buildGoPackage rec { buildInputs = [ makeWrapper ]; + preBuild = '' + buildFlagsArray+=("-ldflags" "-X main.VERSION=v${version}") + ''; + postInstall = '' wrapProgram $bin/bin/terragrunt \ --set TERRAGRUNT_TFPATH ${lib.getBin terraform}/bin/terraform diff --git a/pkgs/applications/networking/cluster/terragrunt/default.nix b/pkgs/applications/networking/cluster/terragrunt/default.nix index e2641b2d657..28fc7fcc666 100644 --- a/pkgs/applications/networking/cluster/terragrunt/default.nix +++ b/pkgs/applications/networking/cluster/terragrunt/default.nix @@ -17,6 +17,10 @@ buildGoPackage rec { buildInputs = [ makeWrapper ]; + preBuild = '' + buildFlagsArray+=("-ldflags" "-X main.VERSION=v${version}") + ''; + postInstall = '' wrapProgram $bin/bin/terragrunt \ --set TERRAGRUNT_TFPATH ${lib.getBin terraform}/bin/terraform