about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2018-01-03 21:47:29 -0800
committerJohn Wiegley <johnw@newartisans.com>2018-01-03 21:48:06 -0800
commit426c513c14c10feac6a6afb1a810f74d8a16ed6e (patch)
treec77de54a318becdbebad015d7dfbd7cc94957c73 /pkgs
parentccb0ba56ef190205a39d59743ef7bd6936da43a0 (diff)
downloadnixlib-426c513c14c10feac6a6afb1a810f74d8a16ed6e.tar
nixlib-426c513c14c10feac6a6afb1a810f74d8a16ed6e.tar.gz
nixlib-426c513c14c10feac6a6afb1a810f74d8a16ed6e.tar.bz2
nixlib-426c513c14c10feac6a6afb1a810f74d8a16ed6e.tar.lz
nixlib-426c513c14c10feac6a6afb1a810f74d8a16ed6e.tar.xz
nixlib-426c513c14c10feac6a6afb1a810f74d8a16ed6e.tar.zst
nixlib-426c513c14c10feac6a6afb1a810f74d8a16ed6e.zip
apg: Permit building again on Darwin
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/security/apg/default.nix7
1 files changed, 6 insertions, 1 deletions
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 = ''