From d1e9045571c56bb277f3af56cde17b56f45f21bf Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Thu, 17 Dec 2009 18:54:12 +0000 Subject: [PATCH] mysql 5.1.41 svn path=/nixpkgs/trunk/; revision=19017 --- pkgs/servers/sql/mysql51/abi_check.patch | 20 ++++++++++++++ pkgs/servers/sql/mysql51/default.nix | 34 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 ++++ 3 files changed, 59 insertions(+) create mode 100644 pkgs/servers/sql/mysql51/abi_check.patch create mode 100644 pkgs/servers/sql/mysql51/default.nix diff --git a/pkgs/servers/sql/mysql51/abi_check.patch b/pkgs/servers/sql/mysql51/abi_check.patch new file mode 100644 index 000000000000..e9f9cfdc9d95 --- /dev/null +++ b/pkgs/servers/sql/mysql51/abi_check.patch @@ -0,0 +1,20 @@ +diff -rc mysql-5.1.40/Makefile.in mysql-5.1.40-new/Makefile.in +*** mysql-5.1.40/Makefile.in 2009-10-06 19:57:22.000000000 +0200 +--- mysql-5.1.40-new/Makefile.in 2009-12-16 13:07:16.060108763 +0100 +*************** +*** 891,897 **** + --srcdir=$(top_srcdir) + storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI + +! all-local: @ABI_CHECK@ + + tags: + support-files/build-tags +--- 891,897 ---- + --srcdir=$(top_srcdir) + storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI + +! all-local: + + tags: + support-files/build-tags diff --git a/pkgs/servers/sql/mysql51/default.nix b/pkgs/servers/sql/mysql51/default.nix new file mode 100644 index 000000000000..92a673584e0b --- /dev/null +++ b/pkgs/servers/sql/mysql51/default.nix @@ -0,0 +1,34 @@ +{stdenv, fetchurl, ps, ncurses, zlib, perl, openssl}: + +# Note: zlib is not required; MySQL can use an internal zlib. + +stdenv.mkDerivation { + name = "mysql-5.1.41"; + + src = fetchurl { + url = ftp://mirror.leaseweb.com/mysql/Downloads/MySQL-5.1/mysql-5.1.41.tar.gz; + sha256 = "05mwinpq35iaglylw5n772vv2p1kxyni6f2hv081gxm58gdj3dsw"; + }; + + buildInputs = [ps ncurses zlib perl openssl]; + + configureFlags = "--enable-thread-safe-client --with-ssl=${openssl} --with-embedded-server" + + (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"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 904373c866f2..dc73ab96a74d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5040,6 +5040,11 @@ let ps = procps; /* !!! Linux only */ }; + mysql51 = import ../servers/sql/mysql51 { + inherit fetchurl ncurses zlib perl openssl stdenv; + ps = procps; /* !!! Linux only */ + }; + mysql = mysql5; mysql_jdbc = import ../servers/sql/mysql/jdbc {