2009-04-08 10:41:18 +01:00
|
|
|
{stdenv, fetchurl, ps, ncurses, zlib, perl, openssl}:
|
2007-10-30 16:03:29 +00:00
|
|
|
|
|
|
|
# Note: zlib is not required; MySQL can use an internal zlib.
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2009-03-07 14:11:45 +00:00
|
|
|
name = "mysql-5.0.77";
|
2007-10-30 16:03:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-03-07 14:11:45 +00:00
|
|
|
url = http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.77.tar.gz;
|
|
|
|
sha256 = "1s0m991aynim8ny28cfwhjw0ly8j5d72xi00461w6yc2hlaijcd9";
|
2007-10-30 16:03:29 +00:00
|
|
|
};
|
|
|
|
|
2008-02-20 23:02:41 +00:00
|
|
|
buildInputs = [ps ncurses zlib perl openssl];
|
2009-04-04 01:02:38 +01:00
|
|
|
|
2009-04-22 00:18:09 +01:00
|
|
|
configureFlags = "--enable-thread-safe-client --with-openssl=${openssl} --with-berkeley-db --with-embedded-server" +
|
2009-04-21 14:22:38 +01: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 "";
|
2007-10-30 16:03:29 +00:00
|
|
|
|
2009-10-12 12:22:16 +01:00
|
|
|
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
|
2009-06-16 14:36:10 +01:00
|
|
|
|
2009-04-04 01:02:38 +01:00
|
|
|
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";
|
|
|
|
};
|
2007-10-30 16:03:29 +00:00
|
|
|
}
|