1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-01 10:00:56 +00:00
nixpkgs/pkgs/servers/sql/mariadb/default.nix

43 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, cmake, ncurses, openssl, bison, boost, libxml2, libaio, judy, libevent, groff, perl, fixDarwinDylibNames }:
2014-02-24 20:34:57 +00:00
stdenv.mkDerivation rec {
name = "mariadb-${version}";
2014-12-09 10:27:37 +00:00
version = "10.0.15";
2014-02-24 20:34:57 +00:00
src = fetchurl {
url = "https://downloads.mariadb.org/interstitial/mariadb-${version}/source/mariadb-${version}.tar.gz";
2014-12-09 10:27:37 +00:00
sha256 = "1n09553brmprs9m6siwjc1ca4b9b1giqasv3mhdrnijda1lcnm4i";
2014-02-24 20:34:57 +00: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 20:34:57 +00:00
cmakeFlags = [ "-DWITH_READLINE=yes" "-DWITH_EMBEDDED_SERVER=yes" "-DINSTALL_SCRIPTDIR=bin" ];
2014-02-24 20:34:57 +00:00
NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
2014-02-24 20:34:57 +00:00
enableParallelBuilding = true;
prePatch = ''
substituteInPlace cmake/libutils.cmake \
--replace /usr/bin/libtool libtool
'';
postInstall = ''
substituteInPlace $out/bin/mysql_install_db \
--replace basedir=\"\" basedir=\"$out\"
'';
passthru.mysqlVersion = "5.5";
2014-02-24 20:34:57 +00:00
meta = {
description = "An enhanced, drop-in replacement for MySQL";
homepage = https://mariadb.org/;
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ shlevy thoughtpolice ];
2014-02-24 20:34:57 +00:00
platforms = stdenv.lib.platforms.all;
};
}