2014-04-30 16:54:35 +02:00
|
|
|
{ stdenv, fetchurl, cmake, ncurses, openssl, bison, boost, libxml2, libaio, judy, libevent, groff, perl, fixDarwinDylibNames }:
|
2014-02-24 21:34:57 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-06-05 09:20:36 +02:00
|
|
|
name = "mariadb-${version}";
|
2014-08-20 08:48:42 +02:00
|
|
|
version = "10.0.13";
|
2014-02-24 21:34:57 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-06-22 15:28:44 +02:00
|
|
|
url = "https://downloads.mariadb.org/interstitial/mariadb-${version}/source/mariadb-${version}.tar.gz";
|
2014-08-20 08:48:42 +02:00
|
|
|
sha256 = "039wz89vs03a27anpshj5xaqknm7cqi7mrypvwingqkq26ns0mhs";
|
2014-02-24 21:34:57 +01:00
|
|
|
};
|
|
|
|
|
2014-04-30 16:54:35 +02:00
|
|
|
buildInputs = [ cmake ncurses openssl bison boost libxml2 judy libevent groff ]
|
|
|
|
++ stdenv.lib.optional (!stdenv.isDarwin) libaio
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames ];
|
|
|
|
|
|
|
|
patches = stdenv.lib.optional stdenv.isDarwin ./my_context_asm.patch;
|
2014-02-24 21:34:57 +01:00
|
|
|
|
2014-06-05 09:20:36 +02:00
|
|
|
cmakeFlags = [ "-DWITH_READLINE=yes" "-DWITH_EMBEDDED_SERVER=yes" "-DINSTALL_SCRIPTDIR=bin" ];
|
2014-02-24 21:34:57 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-04-30 16:54:35 +02:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace cmake/libutils.cmake \
|
|
|
|
--replace /usr/bin/libtool libtool
|
|
|
|
'';
|
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace $out/bin/mysql_install_db \
|
|
|
|
--replace basedir=\"\" basedir=\"$out\"
|
|
|
|
'';
|
|
|
|
|
2014-02-26 13:54:04 +01:00
|
|
|
passthru.mysqlVersion = "5.5";
|
|
|
|
|
2014-02-24 21:34:57 +01:00
|
|
|
meta = {
|
|
|
|
description = "An enhanced, drop-in replacement for MySQL";
|
|
|
|
homepage = https://mariadb.org/;
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2014-06-05 09:20:36 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ shlevy thoughtpolice ];
|
2014-02-24 21:34:57 +01:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|