diff options
author | Aaron Andersen <aaron@fosslib.net> | 2019-07-10 22:49:51 -0400 |
---|---|---|
committer | Aaron Andersen <aaron@fosslib.net> | 2019-07-31 22:35:15 -0400 |
commit | ccb9ada402da6ef01493b1e08d17fc184e7884cb (patch) | |
tree | 2acfea5777a11419b8b9742915f18068a4ed62cb /pkgs/servers/sql | |
parent | 7f8f1c0bfefdf7d96bf59e379a5ac7748a7a4b0a (diff) |
mariadb: fix mytop script
Diffstat (limited to 'pkgs/servers/sql')
-rw-r--r-- | pkgs/servers/sql/mariadb/default.nix | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 94cdf801ff298..de1b6ec0b122b 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -1,8 +1,9 @@ -{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, ncurses, zlib, xz, lzo, lz4, bzip2, snappy +{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, makeWrapper, ncurses, zlib, xz, lzo, lz4, bzip2, snappy , libiconv, openssl, pcre, boost, judy, bison, libxml2, libkrb5 , libaio, libevent, jemalloc, cracklib, systemd, numactl, perl , fixDarwinDylibNames, cctools, CoreServices , asio, buildEnv, check, scons +, less }: with stdenv.lib; @@ -11,6 +12,8 @@ let # in mariadb # spans the whole file libExt = stdenv.hostPlatform.extensions.sharedLibrary; +mytopEnv = perl.withPackages (p: with p; [ DataDumper DBDmysql DBI TermReadKey ]); + mariadb = everything // { inherit client; # libmysqlclient.so in .out, necessary headers in .dev and utils in .bin server = everything; # a full single-output build, including everything in `client` again @@ -133,12 +136,13 @@ everything = stdenv.mkDerivation (common // { outputs = [ "out" "dev" "man" ]; - nativeBuildInputs = common.nativeBuildInputs ++ [ bison ]; + nativeBuildInputs = common.nativeBuildInputs ++ [ bison ] ++ optional (!stdenv.isDarwin) makeWrapper; buildInputs = common.buildInputs ++ [ xz lzo lz4 bzip2 snappy libxml2 boost judy libevent cracklib - ] ++ optional (stdenv.isLinux && !stdenv.isAarch32) numactl; + ] ++ optional (stdenv.isLinux && !stdenv.isAarch32) numactl + ++ optional (!stdenv.isDarwin) mytopEnv; cmakeFlags = common.cmakeFlags ++ [ "-DMYSQL_DATADIR=/var/lib/mysql" @@ -161,6 +165,8 @@ everything = stdenv.mkDerivation (common // { cmakeFlags="$cmakeFlags \ -DINSTALL_SHAREDIR=$dev/share/mysql -DINSTALL_SUPPORTFILESDIR=$dev/share/mysql" + '' + optionalString (!stdenv.isDarwin) '' + patchShebangs scripts/mytop.sh ''; postInstall = '' @@ -181,6 +187,11 @@ everything = stdenv.mkDerivation (common // { sed -i 's/-mariadb/-mysql/' "$out"/bin/galera_new_cluster ''; + # perlPackages.DBDmysql is broken on darwin + postFixup = optionalString (!stdenv.isDarwin) '' + wrapProgram $out/bin/mytop --set PATH ${less}/bin/less + ''; + CXXFLAGS = optionalString stdenv.isi686 "-fpermissive"; }); |