From 8a51989af0fe02f0b37e75bed29dd4b95f0d3607 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 21 Mar 2020 06:25:00 -0500 Subject: [PATCH] terraform-providers.elasticsearch: fix build on darwin --- .../networking/cluster/terraform-providers/default.nix | 2 ++ .../cluster/terraform-providers/elasticsearch/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/default.nix b/pkgs/applications/networking/cluster/terraform-providers/default.nix index 6a285d8b38be..5112277a8c40 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/default.nix +++ b/pkgs/applications/networking/cluster/terraform-providers/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , callPackage , buildGo112Module +, Security }: let list = import ./data.nix; @@ -29,6 +30,7 @@ in # verifying git.apache.org/thrift.git@v0.12.0/go.mod: git.apache.org/thrift.git@v0.12.0/go.mod: Get https://sum.golang.org/lookup/git.apache.org/thrift.git@v0.12.0: dial tcp: lookup sum.golang.org on [::1]:53: read udp [::1]:52968->[::1]:53: read: connection refused # verifying github.com/hashicorp/terraform@v0.12.0/go.mod: github.com/hashicorp/terraform@v0.12.0/go.mod: Get https://sum.golang.org/lookup/github.com/hashicorp/terraform@v0.12.0: 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 {}; diff --git a/pkgs/applications/networking/cluster/terraform-providers/elasticsearch/default.nix b/pkgs/applications/networking/cluster/terraform-providers/elasticsearch/default.nix index 1aadbbc5ccd3..2f13000c0cde 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/elasticsearch/default.nix +++ b/pkgs/applications/networking/cluster/terraform-providers/elasticsearch/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, buildGoModule }: +{ stdenv, fetchFromGitHub, buildGoModule, Security }: buildGoModule rec { pname = "terraform-provider-elasticsearch"; version = "0.7.0"; @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aa5a3ad048c5..75f1a82ba3aa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25969,6 +25969,7 @@ in terraform-providers = recurseIntoAttrs ( callPackage ../applications/networking/cluster/terraform-providers { inherit buildGo112Module; + inherit (darwin.apple_sdk.frameworks) Security; } );