2011-11-08 21:07:57 +00:00
|
|
|
{stdenv, fetchurl, pam, openssl}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-07-13 20:44:33 +00:00
|
|
|
name = "uw-imap-2007f";
|
2011-11-08 21:07:57 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz";
|
|
|
|
sha256 = "0a2a00hbakh0640r2wdpnwr8789z59wnk7rfsihh3j0vbhmmmqak";
|
|
|
|
};
|
|
|
|
|
2013-07-14 01:47:14 +00:00
|
|
|
makeFlags = if stdenv.isDarwin
|
|
|
|
then "osx"
|
|
|
|
else "lnp" # Linux with PAM modules;
|
2013-06-24 12:32:02 +00:00
|
|
|
# -fPIC is required to compile php with imap on x86_64 systems
|
|
|
|
+ stdenv.lib.optionalString stdenv.isx86_64 " EXTRACFLAGS=-fPIC";
|
2011-11-08 21:07:57 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-07 22:28:15 +00:00
|
|
|
|
2013-07-14 01:47:14 +00:00
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ stdenv.lib.optional (!stdenv.isDarwin) pam;
|
2011-11-08 21:07:57 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
2016-04-16 17:44:32 +00:00
|
|
|
sed -i src/osdep/unix/Makefile -e 's,/usr/local/ssl,${openssl.dev},'
|
2015-10-15 19:02:04 +00:00
|
|
|
sed -i src/osdep/unix/Makefile -e 's,^SSLCERTS=.*,SSLCERTS=/etc/ssl/certs,'
|
|
|
|
sed -i src/osdep/unix/Makefile -e 's,^SSLLIB=.*,SSLLIB=${openssl.out}/lib,'
|
2011-11-08 21:07:57 +00:00
|
|
|
'';
|
|
|
|
|
2013-07-14 01:47:14 +00:00
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin
|
2016-04-16 17:44:32 +00:00
|
|
|
"-I${openssl.dev}/include/openssl";
|
2013-07-14 01:47:14 +00:00
|
|
|
|
2011-11-08 21:07:57 +00:00
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin $out/lib $out/include
|
2011-11-08 21:07:57 +00:00
|
|
|
cp c-client/*.h c-client/linkage.c $out/include
|
|
|
|
cp c-client/c-client.a $out/lib/libc-client.a
|
|
|
|
cp mailutil/mailutil imapd/imapd dmail/dmail mlock/mlock mtest/mtest tmail/tmail \
|
|
|
|
tools/{an,ua} $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.washington.edu/imap/;
|
|
|
|
description = "UW IMAP toolkit - IMAP-supporting software developed by the UW";
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
2011-11-08 21:07:57 +00:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
withSSL = true;
|
|
|
|
};
|
|
|
|
}
|