get postfix to build. Note: install still has to be done, but this will probably be a bit tricky, due to sendmail "compatibility" (postfix makes a symlink to "sendmail", so programs will keep on working).

svn path=/nixpkgs/trunk/; revision=5030

+65
+13
pkgs/servers/mail/postfix/default.nix
··· 1 + {stdenv, fetchurl, db4, glibc}: 2 + 3 + stdenv.mkDerivation { 4 + name = "postfix-2.2.9"; 5 + src = fetchurl { 6 + url = ftp://ftp.cs.uu.nl/mirror/postfix/postfix-release/official/postfix-2.2.9.tar.gz; 7 + md5 = "be78631bd9b6bf7735e43abfa54d69f6"; 8 + }; 9 + 10 + buildinputs = [db4]; 11 + patches = [./postfix-2.2.9-db.patch ./postfix-2.2.9-lib.patch]; 12 + inherit glibc; 13 + }
+40
pkgs/servers/mail/postfix/postfix-2.2.9-db.patch
··· 1 + diff -ruN postfix-2.2.9/makedefs postfix-2.2.9.new/makedefs 2 + --- postfix-2.2.9/makedefs 2006-01-03 21:50:25.000000000 +0000 3 + +++ postfix-2.2.9.new/makedefs 2006-03-11 00:38:30.000000000 +0000 4 + @@ -219,21 +219,21 @@ 5 + ;; 6 + Linux.2*) SYSTYPE=LINUX2 7 + # Postfix no longer needs DB 1.85 compatibility 8 + - if [ -f /usr/include/db.h ] 9 + - then 10 + - : we are all set 11 + - elif [ -f /usr/include/db/db.h ] 12 + - then 13 + - CCARGS="$CCARGS -I/usr/include/db" 14 + - else 15 + - # No, we're not going to try db1 db2 db3 etc. 16 + - # On a properly installed system, Postfix builds 17 + - # by including <db.h> and by linking with -ldb 18 + - echo "No <db.h> include file found." 1>&2 19 + - echo "Install the appropriate db*-devel package first." 1>&2 20 + - echo "See the RELEASE_NOTES file for more information." 1>&2 21 + - exit 1 22 + - fi 23 + + #if [ -f /usr/include/db.h ] 24 + + #then 25 + + #: we are all set 26 + + #elif [ -f /usr/include/db/db.h ] 27 + + #then 28 + + #CCARGS="$CCARGS -I/usr/include/db" 29 + + #else 30 + + ## No, we're not going to try db1 db2 db3 etc. 31 + + ## On a properly installed system, Postfix builds 32 + + ## by including <db.h> and by linking with -ldb 33 + + #echo "No <db.h> include file found." 1>&2 34 + + #echo "Install the appropriate db*-devel package first." 1>&2 35 + + #echo "See the RELEASE_NOTES file for more information." 1>&2 36 + + #exit 1 37 + + #fi 38 + # GDBM locks the DBM .pag file after open. This breaks postmap. 39 + # if [ -f /usr/include/gdbm-ndbm.h ] 40 + # then
+12
pkgs/servers/mail/postfix/postfix-2.2.9-lib.patch
··· 1 + diff -ruN postfix-2.2.9/makedefs postfix-2.2.9.new/makedefs 2 + --- postfix-2.2.9/makedefs 2006-01-03 21:50:25.000000000 +0000 3 + +++ postfix-2.2.9.new/makedefs 2006-03-11 01:40:30.000000000 +0000 4 + @@ -247,7 +247,7 @@ 5 + SYSLIBS="-ldb" 6 + for name in nsl resolv $GDBM_LIBS 7 + do 8 + - for lib in /usr/lib64 /lib64 /usr/lib /lib 9 + + for lib in $glibc/usr/lib64 $glibc/lib64 $glibc/usr/lib $glibc/lib 10 + do 11 + test -e $lib/lib$name.a -o -e $lib/lib$name.so && { 12 + SYSLIBS="$SYSLIBS -l$name"