From 53722f25adeaf41c4af5d4b7ddab6f13cc0b435e Mon Sep 17 00:00:00 2001 From: Jens Binkert Date: Fri, 27 Apr 2018 20:20:21 +0200 Subject: [PATCH] terraform-provider-ibm: init at 0.8.0 --- .../terraform-provider-ibm/default.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/networking/cluster/terraform-provider-ibm/default.nix diff --git a/pkgs/applications/networking/cluster/terraform-provider-ibm/default.nix b/pkgs/applications/networking/cluster/terraform-provider-ibm/default.nix new file mode 100644 index 000000000000..9764e029d277 --- /dev/null +++ b/pkgs/applications/networking/cluster/terraform-provider-ibm/default.nix @@ -0,0 +1,38 @@ +{ stdenv, lib, buildGoPackage, fetchFromGitHub }: + +# +# USAGE: +# install the following package globally or in nix-shell: +# +# (terraform.withPlugins ( plugins: [ terraform-provider-ibm ])) +# +# examples: +# https://github.com/IBM-Cloud/terraform-provider-ibm/tree/master/examples +# + +buildGoPackage rec { + name = "terraform-provider-ibm-${version}"; + version = "0.8.0"; + + goPackagePath = "github.com/terraform-providers/terraform-provider-ibm"; + subPackages = [ "./" ]; + + src = fetchFromGitHub { + owner = "IBM-Cloud"; + repo = "terraform-provider-ibm"; + sha256 = "1jc1g2jadh02z4lfqnvgqk5cqrzk8pnn3cj3cwsm3ksa8pccf6w4"; + rev = "v${version}"; + }; + + # Terraform allow checking the provider versions, but this breaks + # if the versions are not provided via file paths. + postBuild = "mv go/bin/terraform-provider-ibm{,_v${version}}"; + + meta = with stdenv.lib; { + homepage = https://github.com/IBM-Cloud/terraform-provider-ibm; + description = "Terraform provider is used to manage IBM Cloud resources."; + platforms = platforms.all; + license = licenses.mpl20; + maintainers = with maintainers; [ jensbin ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b4a88cbe5b2b..6a6de6370e3d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20944,6 +20944,8 @@ with pkgs; terraform = terraform_0_11; terraform-full = terraform_0_11-full; + terraform-provider-ibm = callPackage ../applications/networking/cluster/terraform-provider-ibm {}; + terraform-inventory = callPackage ../applications/networking/cluster/terraform-inventory {}; terraform-provider-nixos = callPackage ../applications/networking/cluster/terraform-provider-nixos {};