Skip to content

Commit

Permalink
Backport terraform updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Höppner committed Mar 26, 2020
1 parent a8d8d34 commit 6ac05b3
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
, buildGoPackage
, fetchFromGitHub
, callPackage
, buildGo112Module
, Security
}:
let
list = import ./data.nix;
Expand All @@ -25,13 +25,11 @@ let
in
{
elasticsearch = callPackage ./elasticsearch {
# Version 0.7.0 fails to build with go 1.13 due to dependencies:
# verifying git.apache.org/[email protected]/go.mod: git.apache.org/[email protected]/go.mod: Get https://sum.golang.org/lookup/git.apache.org/[email protected]: dial tcp: lookup sum.golang.org on [::1]:53: read udp [::1]:52968->[::1]:53: read: connection refused
# verifying github.com/hashicorp/[email protected]/go.mod: github.com/hashicorp/[email protected]/go.mod: Get https://sum.golang.org/lookup/github.com/hashicorp/[email protected]: dial tcp: lookup sum.golang.org on [::1]:53: read udp [::1]:52968->[::1]:53: read: connection refused
buildGoModule = buildGo112Module;
inherit Security;
};
gandi = callPackage ./gandi {};
ibm = callPackage ./ibm {};
libvirt = callPackage ./libvirt {};
lxd = callPackage ./lxd {};
ansible = callPackage ./ansible {};
} // lib.mapAttrs (n: v: toDrv v) list
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, buildGoModule }:
{ stdenv, fetchFromGitHub, buildGoModule, Security }:
buildGoModule rec {
pname = "terraform-provider-elasticsearch";
version = "0.7.0";
Expand All @@ -12,6 +12,8 @@ buildGoModule rec {

modSha256 = "1xk21xswqwpv34j4ba4fj8lcbvfdd12x7rq1hrdyd21mdhmrhw0p";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

subPackages = [ "." ];

# Terraform allow checking the provider versions, but this breaks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@

buildGoPackage rec {
pname = "terraform-provider-libvirt";
version = "0.5.1";
version = "0.6.1";

goPackagePath = "github.com/dmacvicar/terraform-provider-libvirt";

src = fetchFromGitHub {
owner = "dmacvicar";
repo = "terraform-provider-libvirt";
rev = "v${version}";
sha256 = "0shnj5byqj3qzyqniiy1dcygd8xw1h2bx9z6mgcydw8k64fkm4bw";
sha256 = "1l2n97nj6g44n7bhnbjwmv36xi6754p4iq2qnpkdh39x4384a0zz";
};

buildInputs = [ libvirt pkgconfig makeWrapper ];
nativeBuildInputs = [ pkgconfig makeWrapper ];

buildInputs = [ libvirt ];

# mkisofs needed to create ISOs holding cloud-init data,
# and wrapped to terraform via deecb4c1aab780047d79978c636eeb879dd68630
Expand All @@ -48,4 +50,3 @@ buildGoPackage rec {
maintainers = with maintainers; [ mic92 ];
};
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
pname = "terraform-provider-lxd";
version = "1.3.0";

src = fetchFromGitHub {
owner = "sl1pm4t";
repo = "terraform-provider-lxd";
rev = "v${version}";
sha256 = "1k54021178zybh9dqly2ly8ji9x5rka8dn9xd6rv7gkcl5w3y6fv";
};

modSha256 = "1h95ng9by3i3v15s1ws1fv86a47vglivn42xbffdy94s108g0908";

postBuild = "mv ../go/bin/terraform-provider-lxd{,_v${version}}";

meta = with stdenv.lib; {
homepage = "https://github.com/sl1pm4t/terraform-provider-lxd";
description = "Terraform provider for lxd";
platforms = platforms.linux;
license = licenses.mpl20;
maintainers = with maintainers; [ gila ];
};
}
4 changes: 2 additions & 2 deletions pkgs/applications/networking/cluster/terraform/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ in rec {
terraform_0_11-full = terraform_0_11.full;

terraform_0_12 = pluggable (generic {
version = "0.12.20";
sha256 = "1k94iwhdvp1ifg9w7y26cl89ihki2w9kxv8mz06pp9bnfwfw67x5";
version = "0.12.24";
sha256 = "1rjihp6qcaizp2nnv4z20kpmjnqcw95pq5rnhq381a3pdzr0cd0z";
patches = [ ./provider-path.patch ];
passthru = { inherit plugins; };
});
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25497,7 +25497,7 @@ in

terraform-providers = recurseIntoAttrs (
callPackage ../applications/networking/cluster/terraform-providers {
inherit buildGo112Module;
inherit (darwin.apple_sdk.frameworks) Security;
}
);

Expand Down

0 comments on commit 6ac05b3

Please sign in to comment.