From 380dd22f7c896ae9ea03bfcb0a79e4ff1e89f9ee Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 8 Mar 2018 16:50:52 -0500 Subject: [PATCH] terraform-provider-nixos: init at 0.0.1 --- .../terraform-provider-nixos/default.nix | 23 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/applications/networking/cluster/terraform-provider-nixos/default.nix diff --git a/pkgs/applications/networking/cluster/terraform-provider-nixos/default.nix b/pkgs/applications/networking/cluster/terraform-provider-nixos/default.nix new file mode 100644 index 000000000000..135e5402929a --- /dev/null +++ b/pkgs/applications/networking/cluster/terraform-provider-nixos/default.nix @@ -0,0 +1,23 @@ +{ stdenv, lib, buildGoPackage, fetchFromGitHub }: +buildGoPackage rec { + name = "terraform-provider-nixos-${version}"; + version = "0.0.1"; + goPackagePath = "github.com/tweag/terraform-provider-nixos"; + src = fetchFromGitHub { + owner = "tweag"; + repo = "terraform-provider-nixos"; + sha256 = "00vz6qjq1pk39iqg4356b8g3c6slla9jifkv2knk46gc9q93q0lf"; + 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-nixos{,_v${version}}"; + + meta = with stdenv.lib; { + description = "Terraform plugin for outputting NixOS configuration files from Terraform resources."; + homepage = "https://github.com/tweag/terraform-provider-nixos"; + license = licenses.mpl20; + maintainers = with maintainers; [ grahamc ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e97a4d38acbb..1ac40100f152 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20537,6 +20537,8 @@ with pkgs; terraform-inventory = callPackage ../applications/networking/cluster/terraform-inventory {}; + terraform-provider-nixos = callPackage ../applications/networking/cluster/terraform-provider-nixos {}; + terraform-landscape = callPackage ../applications/networking/cluster/terraform-landscape {}; terragrunt = callPackage ../applications/networking/cluster/terragrunt {};