From 64178f1cab97e254017f75090e1ea412848c087b Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 9 Oct 2017 10:04:51 +0200 Subject: [PATCH] mailutils: fix build with mariadb 10.2 --- pkgs/tools/networking/mailutils/default.nix | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix index 97619275ba25..4684c210c6eb 100644 --- a/pkgs/tools/networking/mailutils/default.nix +++ b/pkgs/tools/networking/mailutils/default.nix @@ -1,11 +1,10 @@ -{ stdenv, fetchurl, fetchpatch, autoreconfHook, dejagnu, gettext, libtool, pkgconfig +{ stdenv, fetchurl, fetchpatch, autoreconfHook, dejagnu, gettext, pkgconfig , gdbm, pam, readline, ncurses, gnutls, guile, texinfo, gnum4, sasl, fribidi, nettools -, gss, mysql }: +, python, gss, mysql }: let p = "https://raw.githubusercontent.com/gentoo/gentoo/9c921e89d51876fd876f250324893fd90c019326/net-mail/mailutils/files"; -in -stdenv.mkDerivation rec { +in stdenv.mkDerivation rec { name = "${project}-${version}"; project = "mailutils"; version = "3.2"; @@ -16,11 +15,11 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ - autoreconfHook gettext libtool pkgconfig + autoreconfHook gettext pkgconfig ] ++ stdenv.lib.optional doCheck dejagnu; buildInputs = [ gdbm pam readline ncurses gnutls guile texinfo gnum4 sasl fribidi nettools - gss mysql.connector-c + gss mysql.connector-c python ]; patches = [ @@ -52,14 +51,20 @@ stdenv.mkDerivation rec { ]; postPatch = '' - sed -e '/AM_GNU_GETTEXT_VERSION/s/0.18/0.19/' -i configure.ac 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/mariadb:' 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/mariadb -I${mysql.connector-c}/include/mariadb"; + preCheck = '' - # Add missing files. + # Add missing test files cp ${builtins.toString readmsg-tests} readmsg/tests/ for f in hdr.at nohdr.at twomsg.at weed.at; do mv readmsg/tests/*-$f readmsg/tests/$f