lol
1{ stdenv, fetchurl, perl, openssl, db, zlib, uwimap, html-tidy, pam}:
2
3let
4 ssl = stdenv.lib.optionals uwimap.withSSL
5 "-e 's/CCLIENT_SSL_ENABLE.*= false/CCLIENT_SSL_ENABLE=true/'";
6in
7stdenv.mkDerivation rec {
8 name = "prayer-1.3.5";
9
10 src = fetchurl {
11 url = "ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/${name}.tar.gz";
12 sha256 = "135fjbxjn385b6cjys6qhbwfw61mdcl2akkll4jfpdzfvhbxlyda";
13 };
14
15 patches = [ ./install.patch ];
16 postPatch = ''
17 sed -i -e s/gmake/make/ -e 's/LDAP_ENABLE.*= true/LDAP_ENABLE=false/' \
18 ${ssl} \
19 -e 's/CCLIENT_LIBS=.*/CCLIENT_LIBS=-lc-client/' \
20 -e 's,^PREFIX .*,PREFIX='$out, \
21 Config
22 sed -i -e s,/usr/bin/perl,${perl}/bin/perl, \
23 templates/src/*.pl
24 '' + /* html-tidy updates */ ''
25 substituteInPlace ./session/html_secure_tidy.c \
26 --replace buffio.h tidybuffio.h
27 '';
28
29 buildInputs = [ openssl db zlib uwimap html-tidy pam ];
30 nativeBuildInputs = [ perl ];
31
32 NIX_LDFLAGS = "-lpam";
33
34 meta = {
35 homepage = http://www-uxsup.csx.cam.ac.uk/~dpc22/prayer/;
36 description = "Yet another Webmail interface for IMAP servers on Unix systems written in C";
37 license = stdenv.lib.licenses.gpl2Plus;
38 platforms = stdenv.lib.platforms.linux;
39 };
40}