From e18275de12715ec0296a1e7177bb6f8c583d769c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 15 Apr 2021 00:00:00 +0000 Subject: [PATCH] terraform_0_15: init at 0.15.0 https://github.com/hashicorp/terraform/releases/tag/v0.15.0 --- .../networking/cluster/terraform/default.nix | 8 +++++++ .../terraform/provider-path-0_15.patch | 23 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 32 insertions(+) create mode 100644 pkgs/applications/networking/cluster/terraform/provider-path-0_15.patch diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix index 6cd2cf52efc1..be331156eed5 100644 --- a/pkgs/applications/networking/cluster/terraform/default.nix +++ b/pkgs/applications/networking/cluster/terraform/default.nix @@ -164,6 +164,14 @@ in rec { passthru = { inherit plugins; }; }); + terraform_0_15 = pluggable (generic { + version = "0.15.0"; + sha256 = "0d7hai57x6qczacdnzzvs3766180n6grmq0a7rlw5jp3zgzp8bmr"; + vendorSha256 = "1l67kkrk8jw7v1rqpwj6n0l7lvmfgf1ir430j1n96459s1dzf0cn"; + patches = [ ./provider-path-0_15.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/applications/networking/cluster/terraform/provider-path-0_15.patch b/pkgs/applications/networking/cluster/terraform/provider-path-0_15.patch new file mode 100644 index 000000000000..1896d6018f05 --- /dev/null +++ b/pkgs/applications/networking/cluster/terraform/provider-path-0_15.patch @@ -0,0 +1,23 @@ +diff -Naur terraform.old/command/init.go terraform.new/command/init.go +--- terraform.old/command/init.go ++++ terraform.new/command/init.go +@@ -3,6 +3,7 @@ + import ( + "context" + "fmt" ++ "os" + "log" + "strings" + +@@ -55,6 +56,11 @@ + + var diags tfdiags.Diagnostics + ++ val, ok := os.LookupEnv("NIX_TERRAFORM_PLUGIN_DIR") ++ if ok { ++ flagPluginPath = append(flagPluginPath, val) ++ } ++ + if len(flagPluginPath) > 0 { + c.pluginPath = flagPluginPath + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2b0c876113bd..0138146b5260 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30327,6 +30327,7 @@ in terraform_0_12 terraform_0_13 terraform_0_14 + terraform_0_15 terraform_plugins_test ;