2016-01-16 06:16:56 +01:00
|
|
|
{ stdenv, fetchzip, makeWrapper, perlPackages,
|
|
|
|
... }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
appname = "popfile";
|
|
|
|
version = "1.1.3";
|
|
|
|
name = "${appname}-${version}";
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "http://getpopfile.org/downloads/${appname}-${version}.zip";
|
|
|
|
sha256 = "0gcib9j7zxk8r2vb5dbdz836djnyfza36vi8215nxcdfx1xc7l63";
|
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ] ++ (with perlPackages; [
|
|
|
|
## These are all taken from the popfile documentation as applicable to Linux
|
|
|
|
## http://getpopfile.org/docs/howtos:allplatformsrequireperl
|
|
|
|
perl
|
|
|
|
DBI
|
|
|
|
DBDSQLite
|
|
|
|
HTMLTagset
|
|
|
|
TimeDate # == DateParse
|
|
|
|
HTMLTemplate
|
|
|
|
# IO::Socket::Socks is not in nixpkgs
|
2017-08-11 11:40:08 +02:00
|
|
|
# IOSocketSocks
|
2016-01-16 06:16:56 +01:00
|
|
|
IOSocketSSL
|
|
|
|
NetSSLeay
|
|
|
|
SOAPLite
|
|
|
|
]);
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
# I user `cd` rather than `cp $out/* ...` b/c the * breaks syntax
|
|
|
|
# highlighting in emacs for me.
|
|
|
|
cd $src
|
|
|
|
cp -r * $out/bin
|
|
|
|
cd $out/bin
|
|
|
|
chmod +x *.pl
|
|
|
|
|
|
|
|
find $out -name '*.pl' -executable | while read path; do
|
|
|
|
wrapProgram "$path" \
|
|
|
|
--prefix PERL5LIB : $PERL5LIB:$out/bin \
|
|
|
|
--set POPFILE_ROOT $out/bin \
|
2017-11-17 13:53:54 +01:00
|
|
|
--run 'export POPFILE_USER=''${POPFILE_USER:-$HOME/.popfile}' \
|
2017-11-17 11:15:52 +01:00
|
|
|
--run 'test -d "$POPFILE_USER" || mkdir -m 0700 -p "$POPFILE_USER"'
|
2016-01-16 06:16:56 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2016-02-27 18:24:00 +01:00
|
|
|
description = "An email classification system that automatically sorts messages and fights spam";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://getpopfile.org";
|
2016-01-16 06:16:56 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
|
2017-08-07 00:05:18 +02:00
|
|
|
# Should work on macOS, but havent tested it.
|
2016-01-16 06:16:56 +01:00
|
|
|
# Windows support is more complicated.
|
|
|
|
# http://getpopfile.org/docs/faq:systemrequirements
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|