1 { lib, stdenv, fetchzip, makeWrapper, perlPackages,
4 stdenv.mkDerivation rec {
7 name = "${appname}-${version}";
10 url = "https://getpopfile.org/downloads/${appname}-${version}.zip";
11 sha256 = "0gcib9j7zxk8r2vb5dbdz836djnyfza36vi8215nxcdfx1xc7l63";
15 nativeBuildInputs = [ makeWrapper ];
16 buildInputs = (with perlPackages; [
17 ## These are all taken from the popfile documentation as applicable to Linux
18 ## https://getpopfile.org/docs/howtos:allplatformsrequireperl
23 TimeDate # == DateParse
25 # IO::Socket::Socks is not in nixpkgs
34 # I user `cd` rather than `cp $out/* ...` b/c the * breaks syntax
35 # highlighting in emacs for me.
41 find $out -name '*.pl' -executable | while read path; do
43 --prefix PERL5LIB : $PERL5LIB:$out/bin \
44 --set POPFILE_ROOT $out/bin \
45 --run 'export POPFILE_USER=''${POPFILE_USER:-$HOME/.popfile}' \
46 --run 'test -d "$POPFILE_USER" || mkdir -m 0700 -p "$POPFILE_USER"'
51 description = "Email classification system that automatically sorts messages and fights spam";
52 homepage = "https://getpopfile.org/";
53 license = lib.licenses.gpl2Only;
55 # Should work on macOS, but havent tested it.
56 # Windows support is more complicated.
57 # https://getpopfile.org/docs/faq:systemrequirements
58 platforms = lib.platforms.linux;