terraform: add a "full" passthru

providers are already compiled independently so we don't need Hydra to
follow terraform_MAJ_MIN_full to have them all compiled.

Instead of having to create two aliases per release, add a "full"
passthru for that common use-case.

Eg:

  terraform_0_11_full -> terraform_0_11.full
gstqt5
zimbatm 2018-11-19 21:03:44 +01:00
parent a4195b20e6
commit b554d6208a
No known key found for this signature in database
GPG Key ID: 71BAF6D40C1D63D7
3 changed files with 6 additions and 4 deletions

View File

@ -58,6 +58,7 @@ let
passthru = {
withPlugins = newplugins: withPlugins (x: newplugins x ++ actualPlugins);
full = withPlugins lib.attrValues;
# Ouch
overrideDerivation = f: (pluggable (terraform.overrideDerivation f)).withPlugins plugins;
@ -93,7 +94,7 @@ in rec {
passthru = { inherit plugins; };
});
terraform_0_11-full = terraform_0_11.withPlugins lib.attrValues;
terraform_0_11-full = terraform_0_11.full;
# 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

View File

@ -1,4 +1,4 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub, terraform-full, makeWrapper }:
{ stdenv, lib, buildGoPackage, fetchFromGitHub, terraform, makeWrapper }:
buildGoPackage rec {
name = "terragrunt-${version}";
@ -23,7 +23,7 @@ buildGoPackage rec {
postInstall = ''
wrapProgram $bin/bin/terragrunt \
--set TERRAGRUNT_TFPATH ${lib.getBin terraform-full}/bin/terraform
--set TERRAGRUNT_TFPATH ${lib.getBin terraform.full}/bin/terraform
'';
meta = with stdenv.lib; {

View File

@ -22592,7 +22592,8 @@ with pkgs;
;
terraform = terraform_0_11;
terraform-full = terraform_0_11-full;
# deprecated
terraform-full = terraform.full;
terraform-providers = recurseIntoAttrs (
callPackage ../applications/networking/cluster/terraform-providers {}