From cb75c0f90536d8aa5e970c6f4bedf78d635fe188 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 21 Mar 2020 14:44:57 +0100 Subject: [PATCH] gotools: fix darwin build --- pkgs/development/tools/gotools/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/gotools/default.nix b/pkgs/development/tools/gotools/default.nix index 430f17bfb5b0..d46c9a9fb311 100644 --- a/pkgs/development/tools/gotools/default.nix +++ b/pkgs/development/tools/gotools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, go, buildGoModule, fetchgit }: +{ stdenv, go, buildGoModule, fetchgit, Security }: buildGoModule rec { pname = "gotools-unstable"; @@ -11,6 +11,8 @@ buildGoModule rec { sha256 = "16m62m303j4wqfjr1401xpqpb9m11bs6qc2dhf6x2za2d9pycish"; }; + buildInputs = stdenv.lib.optional stdenv.isDarwin Security; + # Build of golang.org/x/tools/gopls fails with: # can't load package: package golang.org/x/tools/gopls: unknown import path "golang.org/x/tools/gopls": cannot find module providing package golang.org/x/tools/gopls # That is most probably caused by golang.org/x/tools/gopls containing a separate Go module. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 014bb3e0b9a7..7538ed98b403 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17132,7 +17132,9 @@ in go-tools = callPackage ../development/tools/go-tools { }; - gotools = callPackage ../development/tools/gotools { }; + gotools = callPackage ../development/tools/gotools { + inherit (darwin.apple_sdk.frameworks) Security; + }; gotop = callPackage ../tools/system/gotop { };