Skip to content

Instantly share code, notes, and snippets.

@Profpatsch
Forked from savannidgerinel/shell.nix
Last active September 14, 2016 22:49
Show Gist options
  • Save Profpatsch/ee318b0a647b37aa8edb0afba4ff907f to your computer and use it in GitHub Desktop.
Save Profpatsch/ee318b0a647b37aa8edb0afba4ff907f to your computer and use it in GitHub Desktop.
terraform build
let
pkgs = import <nixpkgs> {};
stdenv = pkgs.stdenv;
t = with pkgs; call ./terraform-default.nix {};
in stdenv.mkDerivation {
name = "v2-devops";
buildInputs = [ pkgs.ansible2 t ];
}
{ stdenv, unzip }:
stdenv.mkDerivation rec {
name = "terraform-${version}";
version = "0.7.3";
buildCommand = ''
mkdir $out
unzip $src
mv terraform $out/terraform
echo Installed terraform to $out/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