From 355aa90cfc72ae830bed12f241450f16c1d7c898 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Tue, 15 Jun 2021 10:44:17 +0200 Subject: [PATCH] terraform: export mkTerraform Make the Terraform constructor available for third-party users. --- .../networking/cluster/terraform/default.nix | 23 +++++++++++-------- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix index ae22ee98c5a2..87628115a085 100644 --- a/pkgs/applications/networking/cluster/terraform/default.nix +++ b/pkgs/applications/networking/cluster/terraform/default.nix @@ -153,7 +153,10 @@ let ]; in rec { - terraform_0_12 = pluggable (generic { + # Constructor for other terraform versions + mkTerraform = attrs: pluggable (generic attrs); + + terraform_0_12 = mkTerraform { version = "0.12.31"; sha256 = "03p698xdbk5gj0f9v8v1fpd74zng3948dyy4f2hv7zgks9hid7fg"; patches = [ @@ -165,38 +168,38 @@ rec { }) ]; passthru = { inherit plugins; }; - }); + }; - terraform_0_13 = pluggable (generic { + terraform_0_13 = mkTerraform { version = "0.13.7"; sha256 = "1cahnmp66dk21g7ga6454yfhaqrxff7hpwpdgc87cswyq823fgjn"; patches = [ ./provider-path.patch ]; passthru = { inherit plugins; }; - }); + }; - terraform_0_14 = pluggable (generic { + terraform_0_14 = mkTerraform { version = "0.14.11"; sha256 = "1yi1jj3n61g1kn8klw6l78shd23q79llb7qqwigqrx3ki2mp279j"; vendorSha256 = "1d93aqkjdrvabkvix6h1qaxpjzv7w1wa7xa44czdnjs2lapx4smm"; patches = [ ./provider-path.patch ]; passthru = { inherit plugins; }; - }); + }; - terraform_0_15 = pluggable (generic { + terraform_0_15 = mkTerraform { version = "0.15.5"; sha256 = "18f4a6l24s3cym7gk40agxikd90i56q84wziskw1spy9rgv2yx6d"; vendorSha256 = "12hrpxay6k3kz89ihyhl91c4lw4wp821ppa245w9977fq09fhnx0"; patches = [ ./provider-path-0_15.patch ]; passthru = { inherit plugins; }; - }); + }; - terraform_1_0 = pluggable (generic { + terraform_1_0 = mkTerraform { version = "1.0.0"; sha256 = "sha256-ddcT/I2Qn1pKFyhXgh+CcD3fSv2steSNmjyyiS2SE/o="; vendorSha256 = "sha256-oFvoEsDunJR4IULdGwS6nHBKWEgUehgT+nNM41W/GYo="; 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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ac302bbceaf4..83791af0c91e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31242,6 +31242,7 @@ in termpdfpy = python3Packages.callPackage ../applications/misc/termpdf.py {}; inherit (callPackage ../applications/networking/cluster/terraform { }) + mkTerraform terraform_0_12 terraform_0_13 terraform_0_14