From 0c928f4a1d645a5eea14f3940518ef9f0376f317 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Wed, 15 Mar 2017 11:01:09 -0400 Subject: [PATCH] terragrunt: Set the version variable properly --- pkgs/applications/networking/cluster/terragrunt/0.9.8.nix | 4 ++++ pkgs/applications/networking/cluster/terragrunt/default.nix | 4 ++++ 2 files changed, 8 insertions(+) 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