Skip to content

Commit

Permalink
terra{form,grunt}: Add some needed old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
shlevy committed Mar 14, 2017
1 parent 496120c commit 5fa84fb
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pkgs/applications/networking/cluster/terraform/0.8.5.nix
@@ -0,0 +1,34 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:

buildGoPackage rec {
name = "terraform-${version}";
version = "0.8.5";

goPackagePath = "github.com/hashicorp/terraform";

src = fetchFromGitHub {
owner = "hashicorp";
repo = "terraform";
rev = "v${version}";
sha256 = "1cxwv3652fpsbm2zk1akw356cd7w7vhny1623ighgbz9ha8gvg09";
};

postInstall = ''
# remove all plugins, they are part of the main binary now
for i in $bin/bin/*; do
if [[ $(basename $i) != terraform ]]; then
rm "$i"
fi
done
'';

meta = with stdenv.lib; {
description = "Tool for building, changing, and versioning infrastructure";
homepage = "https://www.terraform.io/";
license = licenses.mpl20;
maintainers = with maintainers; [
jgeerds
zimbatm
];
};
}
31 changes: 31 additions & 0 deletions pkgs/applications/networking/cluster/terragrunt/0.9.8.nix
@@ -0,0 +1,31 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub, terraform, makeWrapper }:

buildGoPackage rec {
name = "terragrunt-${version}";
version = "0.9.8";

goPackagePath = "github.com/gruntwork-io/terragrunt";

src = fetchFromGitHub {
rev = "v${version}";
owner = "gruntwork-io";
repo = "terragrunt";
sha256 = "0aakr17yzh5jzvlmg3pzpnsfwl31njg27bpck541492shqcqmkiz";
};

goDeps = ./deps.nix;

buildInputs = [ makeWrapper ];

postInstall = ''
wrapProgram $bin/bin/terragrunt \
--set TERRAGRUNT_TFPATH ${lib.getBin terraform}/bin/terraform
'';

meta = with stdenv.lib; {
description = "A thin wrapper for Terraform that supports locking for Terraform state and enforces best practices.";
homepage = https://github.com/gruntwork-io/terragrunt/;
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
};
}
6 changes: 6 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -17984,8 +17984,14 @@ with pkgs;

terraform = callPackage ../applications/networking/cluster/terraform {};

terraform_0_8_5 = callPackage ../applications/networking/cluster/terraform/0.8.5.nix {};

terragrunt = callPackage ../applications/networking/cluster/terragrunt {};

terragrunt_0_9_8 = callPackage ../applications/networking/cluster/terragrunt/0.9.8.nix {
terraform = terraform_0_8_5;
};

tetex = callPackage ../tools/typesetting/tex/tetex { libpng = libpng12; };

tewi-font = callPackage ../data/fonts/tewi {};
Expand Down

2 comments on commit 5fa84fb

@copumpkin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What needs them vs. a simple local overrideDerivation?

@shlevy
Copy link
Member Author

@shlevy shlevy commented on 5fa84fb Mar 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

End users, terraform minor version changes have been known to cause breakage.

Please sign in to comment.