nixpkgs/pkgs/servers/prayer/default.nix
Vladimír Čunát 81b9cc6f54 html-tidy: unify with its drop-in replacement tidy-html5
- the original project has been unmaintained for years
- some dependants needed to be patched due to renamed headers
  https://github.com/htacg/tidy-html5/issues/326#issuecomment-160329114
- separate tidy-html5 package was removed, as since the 5.0.0 version
  it's meant as a successor to both, and library name got back
  from libtidy5.so to libtidy.so
  https://github.com/htacg/tidy-html5/issues/326#issuecomment-160314666

/cc committers to tidy-html5: @edwjto and @zimbatm.
2015-11-29 10:32:02 +01:00

40 lines
1.2 KiB
Nix

{ stdenv, fetchurl, perl, openssl, db, zlib, uwimap, html-tidy, pam}:
let
ssl = stdenv.lib.optionals uwimap.withSSL
"-e 's/CCLIENT_SSL_ENABLE.*= false/CCLIENT_SSL_ENABLE=true/'";
in
stdenv.mkDerivation rec {
name = "prayer-1.3.5";
src = fetchurl {
url = "ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/${name}.tar.gz";
sha256 = "135fjbxjn385b6cjys6qhbwfw61mdcl2akkll4jfpdzfvhbxlyda";
};
patches = [ ./install.patch ];
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, \
Config
sed -i -e s,/usr/bin/perl,${perl}/bin/perl, \
templates/src/*.pl
'' + /* html-tidy updates */ ''
substituteInPlace ./session/html_secure_tidy.c \
--replace buffio.h tidybuffio.h
'';
buildInputs = [ openssl db zlib uwimap html-tidy pam ];
nativeBuildInputs = [ perl ];
NIX_LDFLAGS = "-lpam";
meta = {
homepage = http://www-uxsup.csx.cam.ac.uk/~dpc22/prayer/;
description = "Yet another Webmail interface for IMAP servers on Unix systems written in C";
license = stdenv.lib.licenses.gpl2Plus;
};
}