From b11d54582d467072ff911ee3ceb36672f3c4aae5 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 21 Mar 2020 05:58:00 -0500 Subject: [PATCH] pgmetrics: fix build on darwin --- pkgs/tools/misc/pgmetrics/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/pgmetrics/default.nix b/pkgs/tools/misc/pgmetrics/default.nix index b702ffc1703d..04e106ca5522 100644 --- a/pkgs/tools/misc/pgmetrics/default.nix +++ b/pkgs/tools/misc/pgmetrics/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "pgmetrics"; @@ -13,6 +13,8 @@ buildGoModule rec { modSha256 = "0h375zk0ik06g0b5vmi00b1wn5q2c0r137f7qf6l8k8p886x41h6"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; meta = with stdenv.lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e111be6f045f..54a0fd586bbf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5915,7 +5915,9 @@ in inherit (darwin.apple_sdk.frameworks) Security; }; - pgmetrics = callPackage ../tools/misc/pgmetrics { }; + pgmetrics = callPackage ../tools/misc/pgmetrics { + inherit (darwin.apple_sdk.frameworks) Security; + }; pdsh = callPackage ../tools/networking/pdsh { rsh = true; # enable internal rsh implementation