2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, cmake, bison, ncurses, openssl, zlib, libaio, perl }:
|
2017-03-22 19:09:57 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "percona-server";
|
2020-09-15 06:25:19 +00:00
|
|
|
version = "5.6.49-89.0";
|
2017-03-22 19:09:57 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-${version}/source/tarball/percona-server-${version}.tar.gz";
|
2020-09-15 06:25:19 +00:00
|
|
|
sha256 = "09qqk02iny7jvngyk6k2j0kk2sspc6gw8sm3i6nn97njbkihi697";
|
2017-03-22 19:09:57 +00:00
|
|
|
};
|
|
|
|
|
2020-12-31 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake bison perl ];
|
|
|
|
buildInputs = [ ncurses openssl zlib libaio ];
|
2017-03-22 19:09:57 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DFEATURE_SET=community"
|
|
|
|
"-DBUILD_CONFIG=mysql_release"
|
|
|
|
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
|
|
|
|
"-DWITH_SSL=yes"
|
|
|
|
"-DWITH_READLINE=no"
|
|
|
|
"-DWITH_EMBEDDED_SERVER=no"
|
|
|
|
"-DWITH_EDITLINE=bundled"
|
|
|
|
"-DWITH_ZLIB=yes"
|
|
|
|
"-DHAVE_IPV6=no"
|
|
|
|
"-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
|
|
|
|
"-DMYSQL_DATADIR=/var/lib/mysql"
|
|
|
|
"-DINSTALL_SYSCONFDIR=etc/mysql"
|
|
|
|
"-DINSTALL_INFODIR=share/mysql/docs"
|
|
|
|
"-DINSTALL_MANDIR=share/man"
|
|
|
|
"-DINSTALL_PLUGINDIR=lib/mysql/plugin"
|
|
|
|
"-DINSTALL_SCRIPTDIR=bin"
|
|
|
|
"-DINSTALL_INCLUDEDIR=include/mysql"
|
|
|
|
"-DINSTALL_DOCREADMEDIR=share/mysql"
|
|
|
|
"-DINSTALL_SUPPORTFILESDIR=share/mysql"
|
|
|
|
"-DINSTALL_MYSQLSHAREDIR=share/mysql"
|
|
|
|
"-DINSTALL_DOCDIR=share/mysql/docs"
|
|
|
|
"-DINSTALL_SHAREDIR=share/mysql"
|
|
|
|
];
|
|
|
|
|
2019-11-02 22:31:29 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=address-of-packed-member" ];
|
2017-03-22 19:09:57 +00:00
|
|
|
NIX_LDFLAGS = "-lgcc_s";
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -i -e "s|/usr/bin/libtool|libtool|" cmake/libutils.cmake
|
|
|
|
'';
|
|
|
|
postInstall = ''
|
|
|
|
sed -i -e "s|basedir=\"\"|basedir=\"$out\"|" $out/bin/mysql_install_db
|
|
|
|
rm -r $out/mysql-test $out/sql-bench $out/data "$out"/lib/*.a
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.mysqlVersion = "5.6";
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.percona.com";
|
2017-03-22 19:09:57 +00:00
|
|
|
description = "a free, fully compatible, enhanced, open source drop-in replacement for MySQL that provides superior performance, scalability and instrumentation";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ grahamc ];
|
|
|
|
};
|
|
|
|
}
|