From 9c5f8974651e30d46ecbd73c8eefbae84992c2f0 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sun, 8 Jul 2012 00:32:30 +0200 Subject: [PATCH] SpamAssassin: add version 3.3.2 --- pkgs/servers/mail/spamassassin/default.nix | 37 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/servers/mail/spamassassin/default.nix diff --git a/pkgs/servers/mail/spamassassin/default.nix b/pkgs/servers/mail/spamassassin/default.nix new file mode 100644 index 000000000000..8f22d08b7592 --- /dev/null +++ b/pkgs/servers/mail/spamassassin/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, buildPerlPackage, perl, HTMLParser, NetDNS, NetAddrIP, DBFile +, HTTPDate, MailDKIM +}: + +# TODO: +# +# - Mail::SPF +# - IP::Country +# - Razor2 +# - Net::Ident +# - DBI +# - LWP::UserAgent +# - Encode::Detect + +buildPerlPackage rec { + name = "SpamAssassin-3.3.2"; + + src = fetchurl { + url = "http://apache.imsam.info/spamassassin/source/Mail-${name}.tar.bz2"; + sha256 = "01d2jcpy423zfnhg123wlhzysih1hmb93nxfspiaajzh9r5rn8y7"; + }; + + propagatedBuildInputs = [ HTMLParser NetDNS NetAddrIP DBFile + HTTPDate MailDKIM ]; + + makeFlags = "PERL_BIN=${perl}/bin/perl"; + + doCheck = false; + + meta = { + homepage = "http://spamassassin.apache.org/"; + description = "Open-Source Spam Filter"; + license = stdenv.lib.licenses.asl20; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.simons ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a00451a36253..ec698f9735ad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5280,6 +5280,11 @@ let redstore = callPackage ../servers/http/redstore { }; + spamassassin = callPackage ../servers/mail/spamassassin { + inherit (perlPackages) HTMLParser NetDNS NetAddrIP DBFile + HTTPDate MailDKIM; + }; + samba = callPackage ../servers/samba { }; # A lightweight Samba, useful for non-Linux-based OSes.