2009-12-17 18:54:12 +00:00
|
|
|
{stdenv, fetchurl, ps, ncurses, zlib, perl, openssl}:
|
|
|
|
|
|
|
|
# Note: zlib is not required; MySQL can use an internal zlib.
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2011-01-04 12:35:06 +00:00
|
|
|
name = "mysql-5.1.54";
|
2009-12-17 18:54:12 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2011-01-04 12:35:06 +00:00
|
|
|
url = ftp://mirror.leaseweb.com/mysql/Downloads/MySQL-5.1/mysql-5.1.54.tar.gz;
|
|
|
|
sha256 = "07xbnwk7h1xya8s6dw34nrv7ampzag8l0l1szd2pc9zyqkzhydw4";
|
2009-12-17 18:54:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ps ncurses zlib perl openssl];
|
|
|
|
|
2009-12-17 20:15:02 +00:00
|
|
|
configureFlags = "--enable-thread-safe-client --with-ssl=${openssl} --with-embedded-server --with-plugins=max-no-ndb" +
|
2009-12-17 18:54:12 +00:00
|
|
|
(if stdenv.system == "x86_64-linux" then " --with-lib-ccflags=-fPIC" else "");
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = if stdenv.system == "x86_64-linux" then "-fPIC" else "";
|
|
|
|
NIX_CFLAGS_CXXFLAGS = if stdenv.system == "x86_64-linux" then "-fPIC" else "";
|
|
|
|
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
|
|
|
|
|
|
|
|
patches = [./abi_check.patch];
|
|
|
|
|
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
ln -s mysqld_safe $out/bin/mysqld
|
|
|
|
rm -rf $out/mysql-test $out/sql-bench $out/share/info
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.mysql.com/;
|
|
|
|
description = "The world's most popular open source database";
|
|
|
|
};
|
|
|
|
}
|