From ee1c85aee9ebbfc76c6fed31a868e4082e4bad13 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sun, 9 Jul 2017 17:43:03 +0200 Subject: [PATCH] mariadb: lib -> connector-c --- .../science/math/glsurf/default.nix | 2 +- pkgs/applications/video/kodi/default.nix | 2 +- .../haskell-modules/configuration-common.nix | 2 +- .../haskell-modules/configuration-nix.nix | 2 +- pkgs/development/interpreters/php/default.nix | 2 +- pkgs/development/libraries/gdal/default.nix | 2 +- pkgs/development/libraries/gdal/gdal-1_11.nix | 2 +- .../libraries/qt-4.x/4.8/default.nix | 2 +- .../ocaml-modules/mysql/default.nix | 11 +++++-- .../perl-modules/DBD-mysql/default.nix | 2 +- pkgs/development/r-modules/default.nix | 6 ++-- .../ruby-modules/gem-config/default.nix | 4 +-- pkgs/servers/http/lighttpd/default.nix | 2 +- pkgs/servers/sql/mariadb/default.nix | 32 ++++++++++++++++++- pkgs/servers/web-apps/frab/Gemfile.lock | 2 +- pkgs/servers/web-apps/frab/gemset.nix | 6 ++-- pkgs/tools/networking/mailutils/default.nix | 2 +- pkgs/top-level/python-packages.nix | 4 +-- 18 files changed, 62 insertions(+), 25 deletions(-) diff --git a/pkgs/applications/science/math/glsurf/default.nix b/pkgs/applications/science/math/glsurf/default.nix index 3e4c8c702869..67dcfd8dc1de 100644 --- a/pkgs/applications/science/math/glsurf/default.nix +++ b/pkgs/applications/science/math/glsurf/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation { sha256 = "0w8xxfnw2snflz8wdr2ca9f5g91w5vbyp1hwlx1v7vg83d4bwqs7"; }; - buildInputs = [ freeglut mesa mysql.lib mpfr gmp + buildInputs = [ freeglut mesa mysql.connector-c mpfr gmp libtiff libjpeg libpng giflib ] ++ (with ocamlPackages; [ ocaml findlib ocaml_mysql lablgl camlimages_4_0 mlgmpidl diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix index 125a6d492a32..28577a429bd2 100644 --- a/pkgs/applications/video/kodi/default.nix +++ b/pkgs/applications/video/kodi/default.nix @@ -130,7 +130,7 @@ in stdenv.mkDerivation rec { libmpeg2 libsamplerate libmad libogg libvorbis flac libxslt systemd lzo libcdio libmodplug libass libbluray - sqlite mysql.lib avahi lame + sqlite mysql.connector-c avahi lame curl bzip2 zip unzip glxinfo xdpyinfo libcec libcec_platform dcadec libuuid libgcrypt libgpgerror libunistring diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index a7ba0dea10dc..21168fa3537f 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -70,7 +70,7 @@ self: super: { # Use the default version of mysql to build this package (which is actually mariadb). # test phase requires networking - mysql = dontCheck (super.mysql.override { mysql = pkgs.mysql.lib; }); + mysql = dontCheck (super.mysql.override { mysql = pkgs.mysql.connector-c; }); # check requires mysql server mysql-simple = dontCheck super.mysql-simple; diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 50ed1f196378..e4d582595b21 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -53,7 +53,7 @@ self: super: builtins.intersectAttrs super { # Use the default version of mysql to build this package (which is actually mariadb). # test phase requires networking - mysql = dontCheck (super.mysql.override { mysql = pkgs.mysql.lib; }); + mysql = dontCheck (super.mysql.override { mysql = pkgs.mysql.connector-c; }); # CUDA needs help finding the SDK headers and libraries. cuda = overrideCabal super.cuda (drv: { diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index db4eb6eaee0c..e397f4af297b 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -12,7 +12,7 @@ let { version, sha256 }: let php7 = lib.versionAtLeast version "7.0"; - mysqlHeaders = mysql.lib.dev or mysql; + mysqlHeaders = mysql.connector-c or mysql; mysqlndSupport = config.php.mysqlnd or false; mysqlBuildInputs = lib.optional (!mysqlndSupport) mysqlHeaders; diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix index 984d3da81198..0f1637a87e94 100644 --- a/pkgs/development/libraries/gdal/default.nix +++ b/pkgs/development/libraries/gdal/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { "--with-poppler=${poppler.dev}" # optional "--with-libz=${zlib.dev}" # optional "--with-pg=${postgresql}/bin/pg_config" - "--with-mysql=${mysql.lib.dev}/bin/mysql_config" + "--with-mysql=${mysql.connector-c or mysql}/bin/mysql_config" "--with-geotiff=${libgeotiff}" "--with-sqlite3=${sqlite.dev}" "--with-spatialite=${libspatialite}" diff --git a/pkgs/development/libraries/gdal/gdal-1_11.nix b/pkgs/development/libraries/gdal/gdal-1_11.nix index c9f0c0761019..d7906cfdc7db 100644 --- a/pkgs/development/libraries/gdal/gdal-1_11.nix +++ b/pkgs/development/libraries/gdal/gdal-1_11.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { "--with-libz=${zlib.dev}" # optional "--with-pg=${postgresql}/bin/pg_config" - "--with-mysql=${mysql.lib.dev}/bin/mysql_config" + "--with-mysql=${mysql.connector-c}/bin/mysql_config" "--with-geotiff=${libgeotiff}" "--with-python" # optional "--with-static-proj4=${proj}" # optional diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 32691faa6893..488306fc1ce2 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -160,7 +160,7 @@ stdenv.mkDerivation rec { buildInputs = [ cups # Qt dlopen's libcups instead of linking to it postgresql sqlite libjpeg libmng libtiff icu ] - ++ optionals (mysql != null) [ mysql.lib ] + ++ optionals (mysql != null) [ mysql.connector-c ] ++ optionals gtkStyle [ gtk2 gdk_pixbuf ] ++ optionals stdenv.isDarwin [ cf-private ApplicationServices OpenGL Cocoa AGL libcxx libobjc ]; diff --git a/pkgs/development/ocaml-modules/mysql/default.nix b/pkgs/development/ocaml-modules/mysql/default.nix index 3fa8e9d46b40..5482d7ac87cd 100644 --- a/pkgs/development/ocaml-modules/mysql/default.nix +++ b/pkgs/development/ocaml-modules/mysql/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ocaml, findlib, mysql }: +{ stdenv, fetchurl, fetchpatch, ocaml, findlib, mysql, openssl }: # TODO: la versione stabile da' un errore di compilazione dovuto a # qualche cambiamento negli header .h @@ -26,7 +26,14 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; - propagatedBuildInputs = [ mysql.client ]; + propagatedBuildInputs = [ mysql.connector-c ]; + + patches = [ + (fetchpatch { + url = "https://github.com/ygrek/ocaml-mysql/compare/v1.2.1...d6d1b3b262ae2cf493ef56f1dd7afcf663a70a26.patch"; + sha256 = "0018s2wcrvbsw9yaqmwq500qmikwffrgdp5xg9b8v7ixhd4gi6hn"; + }) + ]; meta = { homepage = http://ocaml-mysql.forge.ocamlcore.org; diff --git a/pkgs/development/perl-modules/DBD-mysql/default.nix b/pkgs/development/perl-modules/DBD-mysql/default.nix index 7302516d5429..12ddcf166e25 100644 --- a/pkgs/development/perl-modules/DBD-mysql/default.nix +++ b/pkgs/development/perl-modules/DBD-mysql/default.nix @@ -8,7 +8,7 @@ buildPerlPackage rec { sha256 = "0h4h6zwzj8fwh9ljb8svnsa0a3ch4p10hp59kpdibdb4qh8xwxs7"; }; - buildInputs = [ mysql.lib ] ; + buildInputs = [ mysql.connector-c ] ; propagatedBuildInputs = [ DBI ]; doCheck = false; diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 76c0e5227773..a435ee65e52c 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -320,7 +320,7 @@ let rmatio = [ pkgs.zlib.dev ]; Rmpfr = [ pkgs.gmp pkgs.mpfr.dev ]; Rmpi = [ pkgs.openmpi ]; - RMySQL = [ pkgs.zlib pkgs.mysql.lib pkgs.mariadb pkgs.openssl.dev ]; + RMySQL = [ pkgs.zlib pkgs.mysql.connector-c pkgs.openssl.dev ]; RNetCDF = [ pkgs.netcdf pkgs.udunits ]; RODBCext = [ pkgs.libiodbc ]; RODBC = [ pkgs.libiodbc ]; @@ -798,10 +798,10 @@ let }); RMySQL = old.RMySQL.overrideDerivation (attrs: { - MYSQL_DIR="${pkgs.mysql.lib}"; + MYSQL_DIR="${pkgs.mysql.connector-c}"; preConfigure = '' patchShebangs configure - ''; + ''; }); devEMF = old.devEMF.overrideDerivation (attrs: { diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 05415b889680..bbb7b4400a72 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -167,11 +167,11 @@ in }; mysql = attrs: { - buildInputs = [ mysql.lib zlib openssl ]; + buildInputs = [ mysql.connector-c zlib openssl ]; }; mysql2 = attrs: { - buildInputs = [ mysql.lib zlib openssl ]; + buildInputs = [ mysql.connector-c zlib openssl ]; }; ncursesw = attrs: { diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix index 05722f141edd..181e3bf134fb 100644 --- a/pkgs/servers/http/lighttpd/default.nix +++ b/pkgs/servers/http/lighttpd/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ pcre libxml2 zlib attr bzip2 which file openssl ] ++ stdenv.lib.optional enableMagnet lua5_1 - ++ stdenv.lib.optional enableMysql mysql.lib + ++ stdenv.lib.optional enableMysql mysql.connector-c ++ stdenv.lib.optional enableLdap openldap; configureFlags = [ "--with-openssl" ] diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 707865750722..3b48a666132b 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -11,7 +11,7 @@ let # in mariadb # spans the whole file mariadb = everything // { inherit client; # libmysqlclient.so in .out, necessary headers in .dev and utils in .bin server = everything; # a full single-output build, including everything in `client` again - lib = client; # compat. with the old mariadb split + inherit connector-c; # libmysqlclient.so }; common = rec { # attributes common to both builds @@ -159,4 +159,34 @@ everything = stdenv.mkDerivation (common // { ''; }); +connector-c = stdenv.mkDerivation rec { + name = "mariadb-connector-c-${version}"; + version = "2.3.3"; + + src = fetchurl { + url = "https://downloads.mariadb.org/interstitial/connector-c-${version}/mariadb-connector-c-${version}-src.tar.gz/from/http%3A//ftp.hosteurope.de/mirror/archive.mariadb.org/?serve"; + sha256 = "12a0j4r01vrdpvl53zq433fb74gd4mm4v5jqmnf4nrg76h0p39c2"; + name = "mariadb-connector-c-${version}-src.tar.gz"; + }; + + # outputs = [ "dev" "out" ]; FIXME: cmake variables don't allow that < 3.0 + cmakeFlags = [ "-DWITH_EXTERNAL_ZLIB=ON" ]; + + nativeBuildInputs = [ cmake ]; + propagatedBuildInputs = [ openssl zlib ]; + + enableParallelBuilding = true; + + postFixup = '' + ln -sv mariadb_config $out/bin/mysql_config + ''; + + meta = with stdenv.lib; { + description = "Client library that can be used to connect to MySQL or MariaDB"; + license = licenses.lgpl21; + maintainers = with maintainers; [ globin ]; + platforms = platforms.all; + }; +}; + in mariadb diff --git a/pkgs/servers/web-apps/frab/Gemfile.lock b/pkgs/servers/web-apps/frab/Gemfile.lock index 530c54ebd898..06502ef59ad5 100644 --- a/pkgs/servers/web-apps/frab/Gemfile.lock +++ b/pkgs/servers/web-apps/frab/Gemfile.lock @@ -180,7 +180,7 @@ GEM pry (~> 0.10) pry-rails (0.3.4) pry (>= 0.9.10) - puma (3.6.0) + puma (3.9.1) rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) diff --git a/pkgs/servers/web-apps/frab/gemset.nix b/pkgs/servers/web-apps/frab/gemset.nix index 9f881579f42d..449fbf1a5b6b 100644 --- a/pkgs/servers/web-apps/frab/gemset.nix +++ b/pkgs/servers/web-apps/frab/gemset.nix @@ -628,10 +628,10 @@ puma = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1rmcny3jr1jj01f9fqijwmikj212a5iql7ghifklm77x4a8pp399"; + sha256 = "1k13n500r7v480rcbxm7k09hip0zi7p8zvy3vajj8g9hb7gdcwnp"; type = "gem"; }; - version = "3.6.0"; + version = "3.9.1"; }; rack = { source = { @@ -929,4 +929,4 @@ }; version = "0.9.5"; }; -} \ No newline at end of file +} diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix index aee5302405a5..97619275ba25 100644 --- a/pkgs/tools/networking/mailutils/default.nix +++ b/pkgs/tools/networking/mailutils/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ] ++ stdenv.lib.optional doCheck dejagnu; buildInputs = [ gdbm pam readline ncurses gnutls guile texinfo gnum4 sasl fribidi nettools - gss mysql.lib + gss mysql.connector-c ]; patches = [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f425005c2fe3..f5dfcffaa269 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11534,9 +11534,9 @@ in { sha256 = "0x0c2jg0bb3pp84njaqiic050qkyd7ymwhfvhipnimg58yv40441"; }; - buildInputs = with self; [ nose pkgs.openssl ]; + buildInputs = with self; [ nose ]; - propagatedBuildInputs = with self; [ pkgs.mysql.lib pkgs.zlib ]; + propagatedBuildInputs = with self; [ pkgs.mysql.connector-c ]; meta = { description = "MySQL database binding for Python";