diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
commit | 80d90d9b204f7c17912740f9f414fe5d59f293ba (patch) | |
tree | 5f2065a06e724270610760d59d01c6888b375a46 /infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/terraform/default.nix | |
parent | 3a31a84c7d3e589035ad08499206aac44a81f424 (diff) | |
parent | 83cbad92d73216bb0d9187c56cce0b91f9121d5a (diff) |
Merge commit '83cbad92d73216bb0d9187c56cce0b91f9121d5a' into main
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/terraform/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/terraform/default.nix | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/terraform/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/terraform/default.nix index 6153eaa145c9..d8c17a89e69b 100644 --- a/infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/terraform/default.nix +++ b/infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/terraform/default.nix @@ -1,15 +1,13 @@ -{ stdenv, lib, buildEnv, buildGoPackage, fetchFromGitHub, makeWrapper, coreutils +{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, coreutils , runCommand, runtimeShell, writeText, terraform-providers, fetchpatch }: let - goPackagePath = "github.com/hashicorp/terraform"; - - generic = { version, sha256, ... }@attrs: - let attrs' = builtins.removeAttrs attrs [ "version" "sha256" ]; - in buildGoPackage ({ + generic = { version, sha256, vendorSha256 ? null, ... }@attrs: + let attrs' = builtins.removeAttrs attrs [ "version" "sha256" "vendorSha256" ]; + in buildGoModule ({ name = "terraform-${version}"; - inherit goPackagePath; + inherit vendorSha256; src = fetchFromGitHub { owner = "hashicorp"; @@ -18,7 +16,7 @@ let inherit sha256; }; - postPatch = '' + postConfigure = '' # speakeasy hardcodes /bin/stty https://github.com/bgentry/speakeasy/issues/22 substituteInPlace vendor/github.com/bgentry/speakeasy/speakeasy_unix.go \ --replace "/bin/stty" "${coreutils}/bin/stty" @@ -34,9 +32,12 @@ let ''; preCheck = '' - export HOME=$TMP + export HOME=$TMPDIR + export TF_SKIP_REMOTE_TESTS=1 ''; + subPackages = [ "." ]; + meta = with stdenv.lib; { description = "Tool for building, changing, and versioning infrastructure"; @@ -114,7 +115,7 @@ let (orig: { passthru = orig.passthru // passthru; }) else lib.appendToName "with-plugins" (stdenv.mkDerivation { - inherit (terraform) name; + inherit (terraform) name meta; buildInputs = [ makeWrapper ]; buildCommand = pluginDir + '' @@ -157,8 +158,16 @@ in rec { }); terraform_0_13 = pluggable (generic { - version = "0.13.4"; - sha256 = "1yvcz14q82v9jq4b9knn6wgnhlhrsz2ncvxv4lh9y1avn56chsqc"; + version = "0.13.5"; + sha256 = "1fnydzm5h65pdy2gkq403sllx05cvpldkdzdpcy124ywljb4x9d8"; + patches = [ ./provider-path.patch ]; + passthru = { inherit plugins; }; + }); + + terraform_0_14 = pluggable (generic { + version = "0.14.0"; + sha256 = "0pbglnvb6cx8zrz791lfa67dmjqfsyysbxm2083b1lhlmbybi9ax"; + vendorSha256 = "1gxhdj98np482jm76aj6zbbmkn7vfk8b878hzz59iywgbdr1r4m1"; patches = [ ./provider-path.patch ]; passthru = { inherit plugins; }; }); |