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