anchor.diff:      sha256 = "0zh7xn8yvnw9zkc7gi5290i34viwxp1rn0g1q9nyvmckkvk59lwn";
     };
   
  +  postPatch = ''
  +    sed -i -e '/chown root:mail/d' \
  +           -e 's/chmod [24]755/chmod 0755/' \
  +      */Makefile{.in,.am}
  +    sed -i 's:/usr/lib/mysql:${mysql.connector-c}/lib/mysql:' configure.ac
  +    sed -i 's/0\.18/0.19/' configure.ac
  +    sed -i -e 's:mysql/mysql.h:mysql.h:' \
  +           -e 's:mysql/errmsg.h:errmsg.h:' \
  +      sql/mysql.c
  +  '';
  +
     nativeBuildInputs = [
       autoreconfHook gettext pkgconfig
  -  ] ++ stdenv.lib.optional doCheck dejagnu;
  +  ];
  +
     buildInputs = [
       gdbm pam readline ncurses gnutls guile texinfo gnum4 sasl fribidi nettools
       gss mysql.connector-c python
  
positive.code:     "--with-path-sendmail=${sendmailPath}"
    ];
  
    readmsg-tests = stdenv.lib.optionals doCheck [
      (fetchurl { url = "${p}/hdr.at"; sha256 = "0phpkqyhs26chn63wjns6ydx9468ng3ssbjbfhcvza8h78jlsd98"; })
      (fetchurl { url = "${p}/nohdr.at"; sha256 = "1vkbkfkbqj6ml62s1am8i286hxwnpsmbhbnq0i2i0j1i7iwkk4b7"; })
      (fetchurl { url = "${p}/twomsg.at"; sha256 = "15m29rg2xxa17xhx6jp4s2vwa9d4khw8092vpygqbwlhw68alk9g"; })
      (fetchurl { url = "${p}/weed.at"; sha256 = "1101xakhc99f5gb9cs3mmydn43ayli7b270pzbvh7f9rbvh0d0nh"; })
    ];
  
    postPatch = ''
      sed -i -e '/chown root:mail/d' \
             -e 's/chmod [24]755/chmod 0755/' \
        */Makefile{.in,.am}
      sed -i 's:/usr/lib/mysql:${mysql.connector-c}/lib/mysql:' configure.ac
      sed -i 's/0\.18/0.19/' configure.ac
      sed -i -e 's:mysql/mysql.h:mysql.h:' \
             -e 's:mysql/errmsg.h:errmsg.h:' \
        sql/mysql.c
    '';
  
    NIX_CFLAGS_COMPILE = "-L${mysql.connector-c}/lib/mysql -I${mysql.connector-c}/include/mysql";
  
    preCheck = ''
      # Add missing test files
  
negative.code:     ./path-to-cat.patch
    ];
  
    enableParallelBuilding = false;
    hardeningDisable = [ "format" ];
  
  