summary refs log tree commit diff
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-12-03 08:03:03 -0500
committerGitHub <noreply@github.com>2020-12-03 14:03:03 +0100
commit209bdc8ddf9693c1ce67a643da4075a3a12eb427 (patch)
tree4d8b20255c433fe5b7929c8f72744937af09204d
parent6cffa3e37c2cd01a9ecf891e6570fad863460ff6 (diff)
downloadnixpkgs-209bdc8ddf9693c1ce67a643da4075a3a12eb427.tar
nixpkgs-209bdc8ddf9693c1ce67a643da4075a3a12eb427.tar.gz
nixpkgs-209bdc8ddf9693c1ce67a643da4075a3a12eb427.tar.bz2
nixpkgs-209bdc8ddf9693c1ce67a643da4075a3a12eb427.tar.lz
nixpkgs-209bdc8ddf9693c1ce67a643da4075a3a12eb427.tar.xz
nixpkgs-209bdc8ddf9693c1ce67a643da4075a3a12eb427.tar.zst
nixpkgs-209bdc8ddf9693c1ce67a643da4075a3a12eb427.zip
terraform_0_14: init at 0.14.0 (#105746)
https://github.com/hashicorp/terraform/releases/tag/v0.14.0
-rw-r--r--pkgs/applications/networking/cluster/terraform/default.nix27
-rw-r--r--pkgs/top-level/all-packages.nix1
2 files changed, 19 insertions, 9 deletions
diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix
index b478071ead1..d8c17a89e69 100644
--- a/pkgs/applications/networking/cluster/terraform/default.nix
+++ b/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";
@@ -163,6 +164,14 @@ in rec {
     passthru = { inherit plugins; };
   });
 
+  terraform_0_14 = pluggable (generic {
+    version = "0.14.0";
+    sha256 = "0pbglnvb6cx8zrz791lfa67dmjqfsyysbxm2083b1lhlmbybi9ax";
+    vendorSha256 = "1gxhdj98np482jm76aj6zbbmkn7vfk8b878hzz59iywgbdr1r4m1";
+    patches = [ ./provider-path.patch ];
+    passthru = { inherit plugins; };
+  });
+
   # Tests that the plugins are being used. Terraform looks at the specific
   # file pattern and if the plugin is not found it will try to download it
   # from the Internet. With sandboxing enable this test will fail if that is
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a3c3330ae37..bb7954388aa 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -28139,6 +28139,7 @@ in
     terraform_0_11-full
     terraform_0_12
     terraform_0_13
+    terraform_0_14
     terraform_plugins_test
     ;