Skip to content

Instantly share code, notes, and snippets.

@savannidgerinel
Last active September 14, 2016 23:56
Show Gist options
  • Save savannidgerinel/ecb59d47ad8ea84862e68f03df6d0870 to your computer and use it in GitHub Desktop.
Save savannidgerinel/ecb59d47ad8ea84862e68f03df6d0870 to your computer and use it in GitHub Desktop.
terraform build
let
pkgs = import <nixpkgs> {};
stdenv = pkgs.stdenv;
terraform = import nix-deps/terraform.nix {};
in stdenv.mkDerivation {
name = "v2-devops";
buildInputs = [ pkgs.ansible2 terraform ];
}
{ 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