Skip to content

Commit

Permalink
terraform: move providers to terraform-providers
Browse files Browse the repository at this point in the history
Before, providers were only built indirectly. Since proviers don't
depend on terraform to build they can be moved into their own collection
of packages. This also has the advantage that they can be reached
directly using an attribute path (Eg: terraform-providers.nixos).

Co-authored-by: Wael Nasreddine <[email protected]>
  • Loading branch information
zimbatm and kalbasit committed Sep 28, 2018
1 parent 7dadabb commit ef64786
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
11 changes: 9 additions & 2 deletions pkgs/applications/networking/cluster/terraform/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{ stdenv, lib, buildEnv, buildGoPackage, fetchFromGitHub, makeWrapper }:
{ stdenv
, lib
, buildEnv
, buildGoPackage
, fetchFromGitHub
, makeWrapper
, terraform-providers
}:

let
goPackagePath = "github.com/hashicorp/terraform";
Expand Down Expand Up @@ -75,7 +82,7 @@ let
});
in withPlugins (_: []);

plugins = import ./providers { inherit lib buildGoPackage fetchFromGitHub; };
plugins = removeAttrs terraform-providers ["override" "overrideDerivation" "recurseForDerivations"];
in rec {
terraform_0_8_5 = generic {
version = "0.8.5";
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ mapAliases ({
telepathy_qt5 = libsForQt5.telepathy; # added 2015-12-19
telepathy_salut = telepathy-salut; # added 2018-02-25
telnet = inetutils; # added 2018-05-15
terraform-provider-nixos = terraform-providers.nixos; # added 2018-09-28
tex-gyre-bonum-math = tex-gyre-math.bonum; # added 2018-04-03
tex-gyre-pagella-math = tex-gyre-math.pagella; # added 2018-04-03
tex-gyre-schola-math = tex-gyre-math.schola; # added 2018-04-03
Expand Down
9 changes: 7 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22105,14 +22105,19 @@ with pkgs;
terraform = terraform_0_11;
terraform-full = terraform_0_11-full;

terraform-providers = recurseIntoAttrs (
callPackage ../applications/networking/cluster/terraform-providers {}
);

terraform-provider-libvirt = callPackage ../applications/networking/cluster/terraform-provider-libvirt {};

terraform-provider-ibm = callPackage ../applications/networking/cluster/terraform-provider-ibm {};


terraform-inventory = callPackage ../applications/networking/cluster/terraform-inventory {};

terraform-landscape = callPackage ../applications/networking/cluster/terraform-landscape {};

terraform-provider-libvirt = callPackage ../applications/networking/cluster/terraform-provider-libvirt {};

terragrunt = callPackage ../applications/networking/cluster/terragrunt {};

terragrunt_0_11_1 = callPackage ../applications/networking/cluster/terragrunt/0.11.1.nix {
Expand Down

0 comments on commit ef64786

Please sign in to comment.