2021-01-15 07:07:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, perl, openssl, db, zlib, uwimap, html-tidy, pam}:
|
2011-11-08 21:07:57 +00:00
|
|
|
|
|
|
|
let
|
2021-01-15 07:07:56 +00:00
|
|
|
ssl = lib.optionals uwimap.withSSL
|
2011-11-08 21:07:57 +00:00
|
|
|
"-e 's/CCLIENT_SSL_ENABLE.*= false/CCLIENT_SSL_ENABLE=true/'";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2021-05-23 16:07:31 +01:00
|
|
|
pname = "prayer";
|
|
|
|
version = "1.3.5";
|
2015-11-29 08:33:50 +00:00
|
|
|
|
2011-11-08 21:07:57 +00:00
|
|
|
src = fetchurl {
|
2021-05-23 16:07:31 +01:00
|
|
|
url = "ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/${pname}-${version}.tar.gz";
|
2013-03-30 21:45:45 +00:00
|
|
|
sha256 = "135fjbxjn385b6cjys6qhbwfw61mdcl2akkll4jfpdzfvhbxlyda";
|
2011-11-08 21:07:57 +00:00
|
|
|
};
|
|
|
|
|
2019-09-12 16:23:35 +01:00
|
|
|
patches = [
|
|
|
|
./install.patch
|
|
|
|
|
|
|
|
# fix build errors which result from openssl changes
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.org/data/main/p/prayer/1.3.5-dfsg1-6/debian/patches/disable_ssl3.patch";
|
|
|
|
sha256 = "1rx4bidc9prh4gffipykp144cyi3zd6qzd990s2aad3knzv5bkdd";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.org/data/main/p/prayer/1.3.5-dfsg1-6/debian/patches/openssl1.1.patch";
|
|
|
|
sha256 = "0zinylvq3bcifdmki867gir49pbjx6qb5h019hawwif2l4jmlxw1";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2011-11-08 21:07:57 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i -e s/gmake/make/ -e 's/LDAP_ENABLE.*= true/LDAP_ENABLE=false/' \
|
|
|
|
${ssl} \
|
|
|
|
-e 's/CCLIENT_LIBS=.*/CCLIENT_LIBS=-lc-client/' \
|
|
|
|
-e 's,^PREFIX .*,PREFIX='$out, \
|
2017-12-04 10:03:34 +00:00
|
|
|
-e 's,^CCLIENT_DIR=.*,CCLIENT_DIR=${uwimap}/include/c-client,' \
|
2011-11-08 21:07:57 +00:00
|
|
|
Config
|
|
|
|
sed -i -e s,/usr/bin/perl,${perl}/bin/perl, \
|
|
|
|
templates/src/*.pl
|
2020-01-30 14:36:40 +00:00
|
|
|
sed -i -e '/<stropts.h>/d' lib/os_linux.h
|
2015-11-29 08:33:50 +00:00
|
|
|
'' + /* html-tidy updates */ ''
|
|
|
|
substituteInPlace ./session/html_secure_tidy.c \
|
|
|
|
--replace buffio.h tidybuffio.h
|
2011-11-08 21:07:57 +00:00
|
|
|
'';
|
|
|
|
|
2015-11-29 08:33:50 +00:00
|
|
|
buildInputs = [ openssl db zlib uwimap html-tidy pam ];
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
|
|
|
|
NIX_LDFLAGS = "-lpam";
|
|
|
|
|
2011-11-08 21:07:57 +00:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www-uxsup.csx.cam.ac.uk/~dpc22/prayer/";
|
2011-11-08 21:07:57 +00:00
|
|
|
description = "Yet another Webmail interface for IMAP servers on Unix systems written in C";
|
2021-01-15 07:07:56 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = lib.platforms.linux;
|
2011-11-08 21:07:57 +00:00
|
|
|
};
|
|
|
|
}
|