postfix: Add version 2.11.0 as nixpkgs.postfix211

I think this version should replace the current nixpkgs.postfix,
but it could potentially break stuff since the version jump is
big (2.8 -> 2.11).

+140
+62
pkgs/servers/mail/postfix/2.11.nix
···
··· 1 + { stdenv, fetchurl, makeWrapper, gnused, db, openssl, cyrus_sasl, coreutils 2 + , findutils, gnugrep, gawk 3 + }: 4 + 5 + stdenv.mkDerivation rec { 6 + 7 + name = "postfix-${version}"; 8 + 9 + version = "2.11.0"; 10 + 11 + src = fetchurl { 12 + url = "ftp://ftp.cs.uu.nl/mirror/postfix/postfix-release/official/${name}.tar.gz"; 13 + sha256 = "0f0c6cv6j5m5n4bjp18llvbbxmzmhb70qw1z9vf7h9k6slr9s7fa"; 14 + }; 15 + 16 + patches = [ ./postfix-2.11.0.patch ]; 17 + 18 + buildInputs = [ makeWrapper gnused db openssl cyrus_sasl ]; 19 + 20 + preBuild = '' 21 + sed -e '/^PATH=/d' -i postfix-install 22 + 23 + export command_directory=$out/sbin 24 + export config_directory=$out/etc/postfix 25 + export daemon_directory=$out/libexec/postfix 26 + export data_directory=/var/lib/postfix 27 + export html_directory=$out/share/postfix/doc/html 28 + export mailq_path=$out/bin/mailq 29 + export manpage_directory=$out/share/man 30 + export newaliases_path=$out/bin/newaliases 31 + export queue_directory=/var/spool/postfix 32 + export readme_directory=$out/share/postfix/doc 33 + export sendmail_path=$out/bin/sendmail 34 + 35 + make makefiles \ 36 + CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${cyrus_sasl}/include/sasl' \ 37 + AUXLIBS='-ldb -lnsl -lresolv -lsasl2 -lcrypto -lssl' 38 + ''; 39 + 40 + installTargets = [ "non-interactive-package" ]; 41 + 42 + installFlags = [ " install_root=$out " ]; 43 + 44 + postInstall = '' 45 + mkdir -p $out 46 + mv -v ut/$out/* $out/ 47 + sed -e '/^PATH=/d' -i $out/libexec/postfix/post-install 48 + wrapProgram $out/libexec/postfix/post-install \ 49 + --prefix PATH ":" ${coreutils}/bin:${findutils}/bin:${gnugrep}/bin 50 + wrapProgram $out/libexec/postfix/postfix-script \ 51 + --prefix PATH ":" ${coreutils}/bin:${findutils}/bin:${gnugrep}/bin:${gawk}/bin:${gnused}/bin 52 + ''; 53 + 54 + meta = { 55 + homepage = "http://www.postfix.org/"; 56 + description = "A fast, easy to administer, and secure mail server"; 57 + license = stdenv.lib.licenses.bsdOriginal; 58 + platforms = stdenv.lib.platforms.linux; 59 + maintainers = [ stdenv.lib.maintainers.rickynils ]; 60 + }; 61 + 62 + }
+76
pkgs/servers/mail/postfix/postfix-2.11.0.patch
···
··· 1 + diff -ruN postfix-2.11.0-orig/makedefs postfix-2.11.0/makedefs 2 + --- postfix-2.11.0-orig/makedefs 2014-01-05 18:18:56.000000000 +0100 3 + +++ postfix-2.11.0/makedefs 2014-04-24 09:27:58.193869491 +0200 4 + @@ -290,36 +290,6 @@ 5 + esac 6 + ;; 7 + Linux.2*) SYSTYPE=LINUX2 8 + - case "$CCARGS" in 9 + - *-DNO_DB*) ;; 10 + - *-DHAS_DB*) ;; 11 + - *) if [ -f /usr/include/db.h ] 12 + - then 13 + - : we are all set 14 + - elif [ -f /usr/include/db/db.h ] 15 + - then 16 + - CCARGS="$CCARGS -I/usr/include/db" 17 + - else 18 + - # No, we're not going to try db1 db2 db3 etc. 19 + - # On a properly installed system, Postfix builds 20 + - # by including <db.h> and by linking with -ldb 21 + - echo "No <db.h> include file found." 1>&2 22 + - echo "Install the appropriate db*-devel package first." 1>&2 23 + - exit 1 24 + - fi 25 + - SYSLIBS="-ldb" 26 + - ;; 27 + - esac 28 + - for name in nsl resolv $GDBM_LIBS 29 + - do 30 + - for lib in /usr/lib64 /lib64 /usr/lib /lib 31 + - do 32 + - test -e $lib/lib$name.a -o -e $lib/lib$name.so && { 33 + - SYSLIBS="$SYSLIBS -l$name" 34 + - break 35 + - } 36 + - done 37 + - done 38 + # Kernel 2.4 added IPv6 39 + case "$RELEASE" in 40 + 2.[0-3].*) CCARGS="$CCARGS -DNO_IPV6";; 41 + @@ -363,35 +333,6 @@ 42 + esac 43 + ;; 44 + Linux.3*) SYSTYPE=LINUX3 45 + - case "$CCARGS" in 46 + - *-DNO_DB*) ;; 47 + - *-DHAS_DB*) ;; 48 + - *) if [ -f /usr/include/db.h ] 49 + - then 50 + - : we are all set 51 + - elif [ -f /usr/include/db/db.h ] 52 + - then 53 + - CCARGS="$CCARGS -I/usr/include/db" 54 + - else 55 + - # On a properly installed system, Postfix builds 56 + - # by including <db.h> and by linking with -ldb 57 + - echo "No <db.h> include file found." 1>&2 58 + - echo "Install the appropriate db*-devel package first." 1>&2 59 + - exit 1 60 + - fi 61 + - SYSLIBS="-ldb" 62 + - ;; 63 + - esac 64 + - for name in nsl resolv 65 + - do 66 + - for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/* 67 + - do 68 + - test -e $lib/lib$name.a -o -e $lib/lib$name.so && { 69 + - SYSLIBS="$SYSLIBS -l$name" 70 + - break 71 + - } 72 + - done 73 + - done 74 + ;; 75 + GNU.0*|GNU/kFreeBSD.[567]*) 76 + SYSTYPE=GNU0
+2
pkgs/top-level/all-packages.nix
··· 6530 6531 postfix = callPackage ../servers/mail/postfix { }; 6532 6533 pulseaudio = callPackage ../servers/pulseaudio { 6534 gconf = gnome.GConf; 6535 # The following are disabled in the default build, because if this
··· 6530 6531 postfix = callPackage ../servers/mail/postfix { }; 6532 6533 + postfix211 = callPackage ../servers/mail/postfix/2.11.nix { }; 6534 + 6535 pulseaudio = callPackage ../servers/pulseaudio { 6536 gconf = gnome.GConf; 6537 # The following are disabled in the default build, because if this