Skip to content

Commit

Permalink
apg: Permit building again on Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
jwiegley committed Jan 4, 2018
1 parent ccb0ba5 commit 426c513
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 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 {
Expand All @@ -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 = ''
Expand Down

0 comments on commit 426c513

Please sign in to comment.