From 4f8836ee9971cf83e847bd1690851607586dfc15 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 21 Mar 2020 05:04:00 -0500 Subject: [PATCH] iamy: fix build on darwin --- pkgs/tools/admin/iamy/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/admin/iamy/default.nix b/pkgs/tools/admin/iamy/default.nix index e09cd2f52853..6a1ec948d907 100644 --- a/pkgs/tools/admin/iamy/default.nix +++ b/pkgs/tools/admin/iamy/default.nix @@ -1,11 +1,9 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "iamy"; version = "2.3.2"; - goPackagePath = "github.com/99designs/iamy"; - src = fetchFromGitHub { owner = "99designs"; repo = "iamy"; @@ -15,6 +13,8 @@ buildGoModule rec { modSha256 = "0akak573zvz3xg5d7vf0ch2mrmj1jkzcdc29v3kn43f7944c2wcl"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + buildFlagsArray = [''-ldflags= -X main.Version=v${version} -s -w '']; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cb3d41c89970..fdcda2867a34 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -757,7 +757,9 @@ in inherit (darwin.apple_sdk.frameworks) Security; }; - iamy = callPackage ../tools/admin/iamy { }; + iamy = callPackage ../tools/admin/iamy { + inherit (darwin.apple_sdk.frameworks) Security; + }; azure-cli = callPackage ../tools/admin/azure-cli { python = python3; };