diff options
author | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2016-02-02 06:58:15 +0100 |
---|---|---|
committer | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2016-02-02 06:58:15 +0100 |
commit | 2f3527df47e2208b8dfab44b2a4e246f3b80cf5c (patch) | |
tree | e73090933fc9df7bdc3472dce70018d2ce92460e | |
parent | 1072e2bf4df3b34fc50d75c0a1d76bd1fecb180b (diff) | |
parent | 1cf106dd06d9be7df330013d5d4835317e61630a (diff) | |
download | nixlib-2f3527df47e2208b8dfab44b2a4e246f3b80cf5c.tar nixlib-2f3527df47e2208b8dfab44b2a4e246f3b80cf5c.tar.gz nixlib-2f3527df47e2208b8dfab44b2a4e246f3b80cf5c.tar.bz2 nixlib-2f3527df47e2208b8dfab44b2a4e246f3b80cf5c.tar.lz nixlib-2f3527df47e2208b8dfab44b2a4e246f3b80cf5c.tar.xz nixlib-2f3527df47e2208b8dfab44b2a4e246f3b80cf5c.tar.zst nixlib-2f3527df47e2208b8dfab44b2a4e246f3b80cf5c.zip |
Merge pull request #12436 from badi/popfile-master
popfile: init at 1.1.3
-rw-r--r-- | pkgs/tools/text/popfile/default.nix | 71 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/tools/text/popfile/default.nix b/pkgs/tools/text/popfile/default.nix new file mode 100644 index 000000000000..3310c1a2fe4a --- /dev/null +++ b/pkgs/tools/text/popfile/default.nix @@ -0,0 +1,71 @@ +{ 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 + Digest + DigestMD5 + HTMLTagset + MIMEBase64 # == MIMEQuotedPrint + TimeDate # == DateParse + HTMLTemplate + # IO::Socket::Socks is not in nixpkgs + # IOSocketSocks + IOSocketSSL + NetSSLeay + SOAPLite + ]); + + + phases = [ "unpackPhase" "installPhase" "patchPhase" "postInstall" ]; + + 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 + ''; + + patchPhase = "patchShebangs $out"; + + postInstall = '' + find $out -name '*.pl' -executable | while read path; do + wrapProgram "$path" \ + --prefix PERL5LIB : $PERL5LIB:$out/bin \ + --set POPFILE_ROOT $out/bin \ + --set POPFILE_USER \$\{POPFILE_USER:-\$HOME/.popfile\} \ + --run "test -d \$POPFILE_USER || mkdir -m 0700 -p \$POPFILE_USER" + done + ''; + + meta = { + description = "An email classification system that automatically sorts messages and fights spam."; + homepage = http://getpopfile.org; + license = stdenv.lib.licenses.gpl2; + + # Should work on OS X, but havent tested it. + # Windows support is more complicated. + # http://getpopfile.org/docs/faq:systemrequirements + platforms = stdenv.lib.platforms.linux; + }; + +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f9d214bf1b7..a2b6add86257 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2824,6 +2824,8 @@ let ponysay = callPackage ../tools/misc/ponysay { }; + popfile = callPackage ../tools/text/popfile { }; + povray = callPackage ../tools/graphics/povray { automake = automake113x; # fails with 14 }; |