summary refs log tree commit diff
path: root/pkgs/servers/sql/mariadb
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-11-20 14:32:58 +0100
committerVladimír Čunát <vcunat@gmail.com>2015-11-20 14:32:58 +0100
commit333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb (patch)
tree0f4757ddd2bb3d73b438eea85828d8e01c049583 /pkgs/servers/sql/mariadb
parentbdbbfa0d4247e203ffe3171621b614374da05f70 (diff)
parentb809f886c0bdbd4665fc65a4c308d38a30c368d8 (diff)
downloadnixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar
nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.gz
nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.bz2
nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.lz
nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.xz
nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.zst
nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.zip
Merge staging into closure-size
The most complex problems were from dealing with switches reverted in
the meantime (gcc5, gmp6, ncurses6).
It's likely that darwin is (still) broken nontrivially.
Diffstat (limited to 'pkgs/servers/sql/mariadb')
-rw-r--r--pkgs/servers/sql/mariadb/default.nix34
1 files changed, 26 insertions, 8 deletions
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix
index 20a02b51369c..3da3585fdb96 100644
--- a/pkgs/servers/sql/mariadb/default.nix
+++ b/pkgs/servers/sql/mariadb/default.nix
@@ -1,20 +1,26 @@
-{ stdenv, fetchurl, cmake, ncurses, zlib, openssl, pcre, boost, judy, bison, libxml2
-, libaio, libevent, groff, jemalloc, perl, fixDarwinDylibNames
+{ stdenv, fetchurl, cmake, ncurses, zlib, xz, lzo, lz4, bzip2, snappy
+, openssl, pcre, boost, judy, bison, libxml2
+, libaio, libevent, groff, jemalloc, cracklib, systemd, numactl, perl
+, fixDarwinDylibNames, cctools
 }:
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "mariadb-${version}";
-  version = "10.0.21";
+  version = "10.1.8";
 
   src = fetchurl {
     url    = "https://downloads.mariadb.org/interstitial/mariadb-${version}/source/mariadb-${version}.tar.gz";
-    sha256 = "0i9mzbn35f4lj4y1lqzgbavh5xyx18zfn0ks0nqzvppabkhk56jb";
+    sha256 = "1yiv0161rkgll1yd9r1cb1wdx55rwynj8i623p6wjvda9536mgvw";
   };
 
-  buildInputs = [ cmake ncurses openssl zlib pcre libxml2 boost judy bison libevent ]
-    ++ stdenv.lib.optionals stdenv.isLinux [ jemalloc libaio ]
-    ++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames ];
+  buildInputs = [
+    cmake ncurses openssl zlib xz lzo lz4 bzip2
+    # temporary due to https://mariadb.atlassian.net/browse/MDEV-9000
+    (if stdenv.is64bit then snappy else null)
+    pcre libxml2 boost judy bison libevent cracklib
+  ] ++ stdenv.lib.optionals stdenv.isLinux [ jemalloc libaio systemd numactl ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools ];
 
   patches = stdenv.lib.optional stdenv.isDarwin ./my_context_asm.patch;
 
@@ -49,13 +55,16 @@ stdenv.mkDerivation rec {
     "-DWITH_PARTITION_STORAGE_ENGINE=1"
     "-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1"
     "-DWITHOUT_FEDERATED_STORAGE_ENGINE=1"
+    "-DSECURITY_HARDENED=ON"
+    "-DWITH_WSREP=ON"
   ] ++ stdenv.lib.optionals stdenv.isDarwin [
     "-DWITHOUT_OQGRAPH_STORAGE_ENGINE=1"
     "-DWITHOUT_TOKUDB=1"
+    "-DCURSES_LIBRARY=${ncurses}/lib/libncurses.dylib"
   ];
 
   # fails to find lex_token.h sometimes
-  enableParallelBuilding = false;
+  enableParallelBuilding = true;
 
   outputs = [ "out" "lib" ];
   setOutputFlags = false;
@@ -94,6 +103,15 @@ stdenv.mkDerivation rec {
     mv $out/lib $lib
     mv $out/include $lib
 
+  ''
+  + stdenv.lib.optionalString stdenv.isDarwin ''
+    # Fix library rpaths
+    # TODO: put this in the stdenv to prepare for wide usage of multi-output derivations
+    for file in $(grep -rl $out/lib $lib); do
+      install_name_tool -delete_rpath $out/lib -add_rpath $lib $file
+    done
+
+  '' + ''
     # Fix the mysql_config
     sed -i $out/bin/mysql_config \
       -e 's,-lz,-L${zlib.out}/lib -lz,g' \