anchor.diff:      sha256 = "1rfsfhna5hy5lc6hkg1zc2862pdc5c1y9z6aiy8rinlmzrfplhlb";
     };
   
  -  installTargets = ["non-interactive-package"];
  -  
  -  installFlags = [" install_root=$out "];
  -  
  -  preInstall = ''
  -    sed -e '/^PATH=/d' -i postfix-install
  -  '';
  -  
  -  postInstall = ''
  -    mkdir -p $out
  -    mv ut/$out/* $out/
  +  buildInputs = [db4 openssl cyrus_sasl bison perl];
   
  -    mkdir $out/share/postfix/conf
  -    cp conf/* $out/share/postfix/conf
  -    sed -e 's@PATH=.*@PATH=${coreutils}/bin:${findutils}/bin:${gnused}/bin:${gnugrep}/bin:'$out'/sbin@' -i $out/share/postfix/conf/post-install $out/libexec/postfix/post-install
  -    sed -e '2aPATH=${coreutils}/bin:${findutils}/bin:${gnused}/bin:${gnugrep}/bin:'$out'/sbin' -i $out/share/postfix/conf/postfix-script $out/libexec/postfix/postfix-script
  -    chmod a+x $out/share/postfix/conf/{postfix-script,post-install}
  +  patches = [ ./postfix-2.2.9-db.patch  ./postfix-2.2.9-lib.patch ./db-linux3.patch ];
  +
  +  postPatch = ''
  +    sed -i -e s,/usr/bin,/var/run/current-system/sw/bin, \
  +      -e s,/usr/sbin,/var/run/current-system/sw/sbin, \
  +      -e s,:/sbin,, src/util/sys_defs.h
     '';
   
     preBuild = ''
  
positive.code:     make makefiles CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${cyrus_sasl}/include/sasl' AUXLIBS='-lssl -lcrypto -lsasl2 -ldb -lnsl'
    '';
  
    buildInputs = [db4 openssl cyrus_sasl bison perl];
  
    patches = [ ./postfix-2.2.9-db.patch  ./postfix-2.2.9-lib.patch ./db-linux3.patch ];
  
    postPatch = ''
      sed -i -e s,/usr/bin,/var/run/current-system/sw/bin, \
        -e s,/usr/sbin,/var/run/current-system/sw/sbin, \
        -e s,:/sbin,, src/util/sys_defs.h
  
    meta = {
      homepage = "http://www.postfix.org/";
  
negative.code:     platforms = stdenv.lib.platforms.linux;
      maintainers = [ stdenv.lib.maintainers.simons ];
    };
  }
  