From 572b2bda4e0a2245f465738cc919197ae0af06a4 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 27 Dec 2017 17:00:39 +0100 Subject: [PATCH] treewide: generalise for both mysql & mariadb --- pkgs/development/compilers/hhvm/default.nix | 4 ++-- pkgs/development/libraries/opendbx/default.nix | 4 ++-- pkgs/development/libraries/qt-3/default.nix | 2 +- pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix | 4 ++-- pkgs/development/lisp-modules/shell.nix | 4 ++-- pkgs/development/pure-modules/glpk/default.nix | 2 +- pkgs/development/tools/database/shmig/default.nix | 4 ++-- pkgs/servers/dns/powerdns/default.nix | 4 ++-- pkgs/servers/sql/mysql/5.7.x.nix | 2 ++ pkgs/tools/backup/bareos/default.nix | 2 +- pkgs/tools/backup/mydumper/default.nix | 4 ++-- pkgs/tools/networking/mailutils/default.nix | 4 ++-- pkgs/tools/networking/snabb/default.nix | 4 ++-- 13 files changed, 23 insertions(+), 21 deletions(-) diff --git a/pkgs/development/compilers/hhvm/default.nix b/pkgs/development/compilers/hhvm/default.nix index 2f84387a8888..a66b2264f073 100644 --- a/pkgs/development/compilers/hhvm/default.nix +++ b/pkgs/development/compilers/hhvm/default.nix @@ -2,7 +2,7 @@ , pcre, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php , expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog, libkrb5 , bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng -, libxslt, freetype, gdb, git, perl, mariadb, gmp, libyaml, libedit +, libxslt, freetype, gdb, git, perl, mysql, gmp, libyaml, libedit , libvpx, imagemagick, fribidi, gperf, which, ocamlPackages }: @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { }; buildInputs = - [ cmake pkgconfig boost libunwind mariadb.client libmemcached pcre gdb git perl + [ cmake pkgconfig boost libunwind mysql.connector-c libmemcached pcre gdb git perl libevent gd curl libxml2 icu flex bison openssl zlib php expat libcap oniguruma libdwarf libmcrypt tbb gperftools bzip2 openldap readline libelf uwimap binutils cyrus_sasl pam glog libpng libxslt libkrb5 diff --git a/pkgs/development/libraries/opendbx/default.nix b/pkgs/development/libraries/opendbx/default.nix index 6a027dc9bd46..48ec5141e34f 100644 --- a/pkgs/development/libraries/opendbx/default.nix +++ b/pkgs/development/libraries/opendbx/default.nix @@ -12,8 +12,8 @@ stdenv.mkDerivation rec { }; preConfigure = '' - export CPPFLAGS="-I${mysql.connector-c}/include/mariadb" - export LDFLAGS="-L${mysql.connector-c}/lib/mariadb -L${postgresql}/lib" + export CPPFLAGS="-I${mysql.connector-c}/include/mysql" + export LDFLAGS="-L${mysql.connector-c}/lib/mysql -L${postgresql}/lib" configureFlagsArray=(--with-backends="mysql pgsql sqlite3") ''; diff --git a/pkgs/development/libraries/qt-3/default.nix b/pkgs/development/libraries/qt-3/default.nix index 92cdc1f918aa..1bc4fd1085e1 100644 --- a/pkgs/development/libraries/qt-3/default.nix +++ b/pkgs/development/libraries/qt-3/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation { -I${randrproto}/include" else "-no-xrandr"} ${if xineramaSupport then "-xinerama -L${libXinerama.out}/lib -I${libXinerama.dev}/include" else "-no-xinerama"} ${if cursorSupport then "-L${libXcursor.out}/lib -I${libXcursor.dev}/include" else ""} - ${if mysqlSupport then "-qt-sql-mysql -L${mysql.connector-c}/lib/mariadb -I${mysql.connector-c}/include/mariadb" else ""} + ${if mysqlSupport then "-qt-sql-mysql -L${mysql.connector-c}/lib/mysql -I${mysql.connector-c}/include/mysql" else ""} ${if xftSupport then "-xft -L${libXft.out}/lib -I${libXft.dev}/include -L${libXft.freetype.out}/lib -I${libXft.freetype.dev}/include diff --git a/pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix b/pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix index 6ca3a608934b..f2efa1ab1b4b 100644 --- a/pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix +++ b/pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix @@ -56,8 +56,8 @@ in propagatedBuildInputs = with pkgs; [mysql postgresql sqlite zlib]; overrides = y: (x.overrides y) // { preConfigure = ((x.overrides y).preConfigure or "") + '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pkgs.mysql.connector-c}/include/mariadb" - export NIX_LDFLAGS="$NIX_LDFLAGS -L${pkgs.mysql.connector-c}/lib/mariadb" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pkgs.mysql.connector-c}/include/mysql" + export NIX_LDFLAGS="$NIX_LDFLAGS -L${pkgs.mysql.connector-c}/lib/mysql" ''; }; }; diff --git a/pkgs/development/lisp-modules/shell.nix b/pkgs/development/lisp-modules/shell.nix index b29ba53159e6..d3cb7b36aeeb 100644 --- a/pkgs/development/lisp-modules/shell.nix +++ b/pkgs/development/lisp-modules/shell.nix @@ -5,11 +5,11 @@ self = rec { env = buildEnv { name = name; paths = buildInputs; }; buildInputs = [ gcc stdenv - openssl fuse libuv mariadb libfixposix libev sqlite + openssl fuse libuv mysql.connector-c libfixposix libev sqlite freetds lispPackages.quicklisp-to-nix lispPackages.quicklisp-to-nix-system-info ]; CPATH = "${libfixposix}/include"; - LD_LIBRARY_PATH = "${openssl.out}/lib:${fuse}/lib:${libuv}/lib:${libev}/lib:${mariadb}/lib:${postgresql.lib}/lib:${sqlite.out}/lib:${libfixposix}/lib:${freetds}/lib"; + LD_LIBRARY_PATH = "${openssl.out}/lib:${fuse}/lib:${libuv}/lib:${libev}/lib:${mysql.connector-c}/lib:${postgresql.lib}/lib:${sqlite.out}/lib:${libfixposix}/lib:${freetds}/lib"; }; in stdenv.mkDerivation self diff --git a/pkgs/development/pure-modules/glpk/default.nix b/pkgs/development/pure-modules/glpk/default.nix index df113b9cc4a3..e86f08b57ca9 100644 --- a/pkgs/development/pure-modules/glpk/default.nix +++ b/pkgs/development/pure-modules/glpk/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { preConfigure = '' substituteInPlace configure \ - --replace /usr/include/mysql ${mysql.connector-c}/include/mariadb + --replace /usr/include/mysql ${mysql.connector-c}/include/mysql ''; configureFlags = [ "--enable-dl" "--enable-odbc" diff --git a/pkgs/development/tools/database/shmig/default.nix b/pkgs/development/tools/database/shmig/default.nix index a397ba696977..49e90ce64c87 100644 --- a/pkgs/development/tools/database/shmig/default.nix +++ b/pkgs/development/tools/database/shmig/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub , withMySQL ? false, withPSQL ? false, withSQLite ? false -, mariadb, postgresql, sqlite, gawk, which +, mysql, postgresql, sqlite, gawk, which , lib }: @@ -20,7 +20,7 @@ stdenv.mkDerivation { patchShebangs . substituteInPlace shmig \ - --replace "\`which mysql\`" "${lib.optionalString withMySQL "${mariadb}/bin/mysql"}" \ + --replace "\`which mysql\`" "${lib.optionalString withMySQL "${mysql.client}/bin/mysql"}" \ --replace "\`which psql\`" "${lib.optionalString withPSQL "${postgresql}/bin/psql"}" \ --replace "\`which sqlite3\`" "${lib.optionalString withSQLite "${sqlite}/bin/sqlite3"}" \ --replace "awk" "${gawk}/bin/awk" \ diff --git a/pkgs/servers/dns/powerdns/default.nix b/pkgs/servers/dns/powerdns/default.nix index d7556a39ee92..79fff80b0b8c 100644 --- a/pkgs/servers/dns/powerdns/default.nix +++ b/pkgs/servers/dns/powerdns/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, boost, libyamlcpp, libsodium, sqlite, protobuf, - libmysql, postgresql, lua, openldap, geoip, curl + mysql57, postgresql, lua, openldap, geoip, curl }: stdenv.mkDerivation rec { @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ boost libmysql postgresql lua openldap sqlite protobuf geoip libyamlcpp libsodium curl ]; + buildInputs = [ boost mysql57.connector-c postgresql lua openldap sqlite protobuf geoip libyamlcpp libsodium curl ]; # nix destroy with-modules arguments, when using configureFlags preConfigure = '' diff --git a/pkgs/servers/sql/mysql/5.7.x.nix b/pkgs/servers/sql/mysql/5.7.x.nix index 0098353808fa..ae3fa40a8945 100644 --- a/pkgs/servers/sql/mysql/5.7.x.nix +++ b/pkgs/servers/sql/mysql/5.7.x.nix @@ -56,7 +56,9 @@ self = stdenv.mkDerivation rec { ''; passthru = { + client = self; connector-c = self; + server = self; mysqlVersion = "5.7"; }; diff --git a/pkgs/tools/backup/bareos/default.nix b/pkgs/tools/backup/bareos/default.nix index 82d379c49d6a..4af20f76449a 100644 --- a/pkgs/tools/backup/bareos/default.nix +++ b/pkgs/tools/backup/bareos/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ nettools gettext readline openssl python2 flex ncurses sqlite postgresql - libmysql zlib lzo jansson acl glusterfs libceph libcap rocksdb + mysql.connector-c zlib lzo jansson acl glusterfs libceph libcap rocksdb ]; postPatch = '' diff --git a/pkgs/tools/backup/mydumper/default.nix b/pkgs/tools/backup/mydumper/default.nix index 5b1f8f3fd5cb..da8805bc226e 100644 --- a/pkgs/tools/backup/mydumper/default.nix +++ b/pkgs/tools/backup/mydumper/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, cmake, pkgconfig -, glib, zlib, pcre, mariadb, libressl, }: +, glib, zlib, pcre, mysql, libressl }: stdenv.mkDerivation rec { version = "0.9.3"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ glib zlib pcre mariadb.client.dev libressl ]; + buildInputs = [ glib zlib pcre mysql.connector-c libressl ]; meta = with stdenv.lib; { description = ''High-perfomance MySQL backup tool''; diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix index 4684c210c6eb..6f47b4b55766 100644 --- a/pkgs/tools/networking/mailutils/default.nix +++ b/pkgs/tools/networking/mailutils/default.nix @@ -54,14 +54,14 @@ in stdenv.mkDerivation rec { 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:/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/mariadb -I${mysql.connector-c}/include/mariadb"; + NIX_CFLAGS_COMPILE = "-L${mysql.connector-c}/lib/mysql -I${mysql.connector-c}/include/mysql"; preCheck = '' # Add missing test files diff --git a/pkgs/tools/networking/snabb/default.nix b/pkgs/tools/networking/snabb/default.nix index f3baddd2653c..46580c0b802c 100644 --- a/pkgs/tools/networking/snabb/default.nix +++ b/pkgs/tools/networking/snabb/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, bash, makeWrapper, git, mariadb, diffutils, which, coreutils, procps, nettools }: +{ stdenv, lib, fetchFromGitHub, bash, makeWrapper, git, mysql, diffutils, which, coreutils, procps, nettools }: stdenv.mkDerivation rec { name = "snabb-${version}"; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { done # We need a way to pass $PATH to the scripts - sed -i '2iexport PATH=${stdenv.lib.makeBinPath [ git mariadb which procps coreutils ]}' src/program/snabbnfv/neutron_sync_master/neutron_sync_master.sh.inc + sed -i '2iexport PATH=${stdenv.lib.makeBinPath [ git mysql.client which procps coreutils ]}' src/program/snabbnfv/neutron_sync_master/neutron_sync_master.sh.inc sed -i '2iexport PATH=${stdenv.lib.makeBinPath [ git coreutils diffutils nettools ]}' src/program/snabbnfv/neutron_sync_agent/neutron_sync_agent.sh.inc '';