mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 14:19:58 +03:00
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).
This commit is contained in:
parent
1a877418d4
commit
7336218a9e
62
pkgs/servers/mail/postfix/2.11.nix
Normal file
62
pkgs/servers/mail/postfix/2.11.nix
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{ stdenv, fetchurl, makeWrapper, gnused, db, openssl, cyrus_sasl, coreutils
|
||||||
|
, findutils, gnugrep, gawk
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
|
name = "postfix-${version}";
|
||||||
|
|
||||||
|
version = "2.11.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "ftp://ftp.cs.uu.nl/mirror/postfix/postfix-release/official/${name}.tar.gz";
|
||||||
|
sha256 = "0f0c6cv6j5m5n4bjp18llvbbxmzmhb70qw1z9vf7h9k6slr9s7fa";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [ ./postfix-2.11.0.patch ];
|
||||||
|
|
||||||
|
buildInputs = [ makeWrapper gnused db openssl cyrus_sasl ];
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
sed -e '/^PATH=/d' -i postfix-install
|
||||||
|
|
||||||
|
export command_directory=$out/sbin
|
||||||
|
export config_directory=$out/etc/postfix
|
||||||
|
export daemon_directory=$out/libexec/postfix
|
||||||
|
export data_directory=/var/lib/postfix
|
||||||
|
export html_directory=$out/share/postfix/doc/html
|
||||||
|
export mailq_path=$out/bin/mailq
|
||||||
|
export manpage_directory=$out/share/man
|
||||||
|
export newaliases_path=$out/bin/newaliases
|
||||||
|
export queue_directory=/var/spool/postfix
|
||||||
|
export readme_directory=$out/share/postfix/doc
|
||||||
|
export sendmail_path=$out/bin/sendmail
|
||||||
|
|
||||||
|
make makefiles \
|
||||||
|
CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${cyrus_sasl}/include/sasl' \
|
||||||
|
AUXLIBS='-ldb -lnsl -lresolv -lsasl2 -lcrypto -lssl'
|
||||||
|
'';
|
||||||
|
|
||||||
|
installTargets = [ "non-interactive-package" ];
|
||||||
|
|
||||||
|
installFlags = [ " install_root=$out " ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out
|
||||||
|
mv -v ut/$out/* $out/
|
||||||
|
sed -e '/^PATH=/d' -i $out/libexec/postfix/post-install
|
||||||
|
wrapProgram $out/libexec/postfix/post-install \
|
||||||
|
--prefix PATH ":" ${coreutils}/bin:${findutils}/bin:${gnugrep}/bin
|
||||||
|
wrapProgram $out/libexec/postfix/postfix-script \
|
||||||
|
--prefix PATH ":" ${coreutils}/bin:${findutils}/bin:${gnugrep}/bin:${gawk}/bin:${gnused}/bin
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "http://www.postfix.org/";
|
||||||
|
description = "A fast, easy to administer, and secure mail server";
|
||||||
|
license = stdenv.lib.licenses.bsdOriginal;
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.rickynils ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
76
pkgs/servers/mail/postfix/postfix-2.11.0.patch
Normal file
76
pkgs/servers/mail/postfix/postfix-2.11.0.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
diff -ruN postfix-2.11.0-orig/makedefs postfix-2.11.0/makedefs
|
||||||
|
--- postfix-2.11.0-orig/makedefs 2014-01-05 18:18:56.000000000 +0100
|
||||||
|
+++ postfix-2.11.0/makedefs 2014-04-24 09:27:58.193869491 +0200
|
||||||
|
@@ -290,36 +290,6 @@
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
Linux.2*) SYSTYPE=LINUX2
|
||||||
|
- case "$CCARGS" in
|
||||||
|
- *-DNO_DB*) ;;
|
||||||
|
- *-DHAS_DB*) ;;
|
||||||
|
- *) if [ -f /usr/include/db.h ]
|
||||||
|
- then
|
||||||
|
- : we are all set
|
||||||
|
- elif [ -f /usr/include/db/db.h ]
|
||||||
|
- then
|
||||||
|
- CCARGS="$CCARGS -I/usr/include/db"
|
||||||
|
- else
|
||||||
|
- # No, we're not going to try db1 db2 db3 etc.
|
||||||
|
- # On a properly installed system, Postfix builds
|
||||||
|
- # by including <db.h> and by linking with -ldb
|
||||||
|
- echo "No <db.h> include file found." 1>&2
|
||||||
|
- echo "Install the appropriate db*-devel package first." 1>&2
|
||||||
|
- exit 1
|
||||||
|
- fi
|
||||||
|
- SYSLIBS="-ldb"
|
||||||
|
- ;;
|
||||||
|
- esac
|
||||||
|
- for name in nsl resolv $GDBM_LIBS
|
||||||
|
- do
|
||||||
|
- for lib in /usr/lib64 /lib64 /usr/lib /lib
|
||||||
|
- do
|
||||||
|
- test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
|
||||||
|
- SYSLIBS="$SYSLIBS -l$name"
|
||||||
|
- break
|
||||||
|
- }
|
||||||
|
- done
|
||||||
|
- done
|
||||||
|
# Kernel 2.4 added IPv6
|
||||||
|
case "$RELEASE" in
|
||||||
|
2.[0-3].*) CCARGS="$CCARGS -DNO_IPV6";;
|
||||||
|
@@ -363,35 +333,6 @@
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
Linux.3*) SYSTYPE=LINUX3
|
||||||
|
- case "$CCARGS" in
|
||||||
|
- *-DNO_DB*) ;;
|
||||||
|
- *-DHAS_DB*) ;;
|
||||||
|
- *) if [ -f /usr/include/db.h ]
|
||||||
|
- then
|
||||||
|
- : we are all set
|
||||||
|
- elif [ -f /usr/include/db/db.h ]
|
||||||
|
- then
|
||||||
|
- CCARGS="$CCARGS -I/usr/include/db"
|
||||||
|
- else
|
||||||
|
- # On a properly installed system, Postfix builds
|
||||||
|
- # by including <db.h> and by linking with -ldb
|
||||||
|
- echo "No <db.h> include file found." 1>&2
|
||||||
|
- echo "Install the appropriate db*-devel package first." 1>&2
|
||||||
|
- exit 1
|
||||||
|
- fi
|
||||||
|
- SYSLIBS="-ldb"
|
||||||
|
- ;;
|
||||||
|
- esac
|
||||||
|
- for name in nsl resolv
|
||||||
|
- do
|
||||||
|
- for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/*
|
||||||
|
- do
|
||||||
|
- test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
|
||||||
|
- SYSLIBS="$SYSLIBS -l$name"
|
||||||
|
- break
|
||||||
|
- }
|
||||||
|
- done
|
||||||
|
- done
|
||||||
|
;;
|
||||||
|
GNU.0*|GNU/kFreeBSD.[567]*)
|
||||||
|
SYSTYPE=GNU0
|
@ -6530,6 +6530,8 @@ let
|
|||||||
|
|
||||||
postfix = callPackage ../servers/mail/postfix { };
|
postfix = callPackage ../servers/mail/postfix { };
|
||||||
|
|
||||||
|
postfix211 = callPackage ../servers/mail/postfix/2.11.nix { };
|
||||||
|
|
||||||
pulseaudio = callPackage ../servers/pulseaudio {
|
pulseaudio = callPackage ../servers/pulseaudio {
|
||||||
gconf = gnome.GConf;
|
gconf = gnome.GConf;
|
||||||
# The following are disabled in the default build, because if this
|
# The following are disabled in the default build, because if this
|
||||||
|
Loading…
Reference in New Issue
Block a user