From 426c513c14c10feac6a6afb1a810f74d8a16ed6e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 3 Jan 2018 21:47:29 -0800 Subject: [PATCH] apg: Permit building again on Darwin --- pkgs/tools/security/apg/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/apg/default.nix b/pkgs/tools/security/apg/default.nix index 24d88517b6a4..04b29bcf8f7c 100644 --- a/pkgs/tools/security/apg/default.nix +++ b/pkgs/tools/security/apg/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, openssl }: stdenv.mkDerivation rec { name = "apg-2.3.0b"; src = fetchurl { @@ -8,9 +8,14 @@ stdenv.mkDerivation rec { configurePhase = '' substituteInPlace Makefile --replace /usr/local "$out" ''; + makeFlags = stdenv.lib.optionals stdenv.isDarwin ["CC=cc"]; patches = [ ./apg.patch ]; + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + sed -i -e 's|APG_CLIBS += -lcrypt|APG_CLIBS += -L${openssl.out}/lib -lcrypto|' Makefile + ''; + meta = { description = "Tools for random password generation"; longDescription = ''