diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/terraform-providers/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/networking/cluster/terraform-providers/default.nix | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/terraform-providers/default.nix b/nixpkgs/pkgs/applications/networking/cluster/terraform-providers/default.nix index 48923330afee..54959e458314 100644 --- a/nixpkgs/pkgs/applications/networking/cluster/terraform-providers/default.nix +++ b/nixpkgs/pkgs/applications/networking/cluster/terraform-providers/default.nix @@ -39,25 +39,28 @@ let passthru = data; }; - # These providers are managed with the ./update-all script - automated-providers = lib.mapAttrs (_: attrs: + # Our generic constructor to build new providers + mkProvider = attrs: (if (lib.hasAttr "vendorSha256" attrs) then buildWithGoModule else buildWithGoPackage) - attrs) list; + attrs; + + # These providers are managed with the ./update-all script + automated-providers = lib.mapAttrs (_: attrs: mkProvider attrs) list; # These are the providers that don't fall in line with the default model special-providers = { # Packages that don't fit the default model - ansible = callPackage ./ansible {}; - cloudfoundry = callPackage ./cloudfoundry {}; - gandi = callPackage ./gandi {}; - hcloud = callPackage ./hcloud {}; - libvirt = callPackage ./libvirt {}; - linuxbox = callPackage ./linuxbox {}; - lxd = callPackage ./lxd {}; - vpsadmin = callPackage ./vpsadmin {}; - vercel = callPackage ./vercel {}; + ansible = callPackage ./ansible { }; + cloudfoundry = callPackage ./cloudfoundry { }; + gandi = callPackage ./gandi { }; + hcloud = callPackage ./hcloud { }; + libvirt = callPackage ./libvirt { }; + linuxbox = callPackage ./linuxbox { }; + lxd = callPackage ./lxd { }; + vpsadmin = callPackage ./vpsadmin { }; + vercel = callPackage ./vercel { }; } // (lib.optionalAttrs (config.allowAliases or false) { kubernetes-alpha = throw "This has been merged as beta into the kubernetes provider. See https://www.hashicorp.com/blog/beta-support-for-crds-in-the-terraform-provider-for-kubernetes for details"; }); in - automated-providers // special-providers +automated-providers // special-providers // { inherit mkProvider; } |