Last active
September 14, 2016 23:56
-
-
Save savannidgerinel/ecb59d47ad8ea84862e68f03df6d0870 to your computer and use it in GitHub Desktop.
terraform build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
pkgs = import <nixpkgs> {}; | |
stdenv = pkgs.stdenv; | |
terraform = import nix-deps/terraform.nix {}; | |
in stdenv.mkDerivation { | |
name = "v2-devops"; | |
buildInputs = [ pkgs.ansible2 terraform ]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {}, | |
stdenv ? pkgs.stdenv }: | |
stdenv.mkDerivation rec { | |
name = "terraform-${version}"; | |
version = "0.7.3"; | |
buildCommand = '' | |
mkdir -p $out/bin | |
unzip $src | |
mv terraform $out/bin/terraform | |
echo Installed terraform to $out/bin/terraform | |
''; | |
src = pkgs.fetchurl { | |
url = "https://releases.hashicorp.com/terraform/0.7.3/terraform_0.7.3_linux_amd64.zip"; | |
sha256 = "4e985f222ec99616e8c730d737c9b400f9d73bf0c436661ec888b2406d3a6f39"; | |
name = "terraform_0.7.3_linux_amd64.zip"; | |
}; | |
buildInputs = [ pkgs.unzip ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment