diff options
Diffstat (limited to 'pkgs/applications/networking/cluster/terraform')
-rw-r--r-- | pkgs/applications/networking/cluster/terraform/default.nix | 8 | ||||
-rw-r--r-- | pkgs/applications/networking/cluster/terraform/provider-path-0_15.patch | 23 |
2 files changed, 31 insertions, 0 deletions
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 + } |