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.
|
|
|
|
|
2013-05-14 10:47:04 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-09-06 17:20:17 +01:00
|
|
|
name = "mysql-5.1.73";
|
2009-12-17 18:54:12 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-12-17 11:14:46 +00:00
|
|
|
url = "mirror://mysql/MySQL-5.1/${name}.tar.gz";
|
2014-09-06 17:20:17 +01:00
|
|
|
sha256 = "1dfwi4ck0vq6sdci6gz0031s7zz5lc3pddqlgm0292s00l9y5sq5";
|
2009-12-17 18:54:12 +00:00
|
|
|
};
|
|
|
|
|
2012-01-14 11:58:29 +00:00
|
|
|
buildInputs = [ncurses zlib perl openssl] ++ stdenv.lib.optional stdenv.isLinux ps;
|
2009-12-17 18:54:12 +00:00
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2014-02-26 12:54:04 +00:00
|
|
|
passthru.mysqlVersion = "5.1";
|
|
|
|
|
2009-12-17 18:54:12 +00:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.mysql.com/;
|
|
|
|
description = "The world's most popular open source database";
|
2012-01-14 11:58:29 +00:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2009-12-17 18:54:12 +00:00
|
|
|
};
|
|
|
|
}
|