mariadb: cleanup build configuration

This commit is contained in:
Izorkin
2021-11-19 20:58:01 +03:00
parent cff899a959
commit 595511e632
+19 -13
View File
@@ -1,9 +1,15 @@
{ lib, stdenv, fetchurl, fetchFromGitHub, cmake, pkg-config, makeWrapper, ncurses, nixosTests
, libiconv, openssl, pcre2, boost, judy, bison, libxml2, libkrb5, linux-pam, pmdk, curl
, liburing, libevent, jemalloc, cracklib, systemd, perl
{ lib, stdenv, fetchurl, nixosTests
# Native buildInputs components
, bison, boost, cmake, fixDarwinDylibNames, flex, makeWrapper, pkg-config
# Common components
, curl, libiconv, ncurses, openssl, pcre2
, libkrb5, liburing, systemd
, CoreServices, cctools, perl
, jemalloc, less
# Server components
, bzip2, lz4, lzo, snappy, xz, zlib, zstd
, fixDarwinDylibNames, cctools, CoreServices, less
, numactl # NUMA Support
, cracklib, judy, libevent, libxml2
, linux-pam, numactl, pmdk
, withStorageMroonga ? true, kytea, libsodium, msgpack, zeromq
, withStorageRocks ? true
}:
@@ -34,9 +40,9 @@ common = rec { # attributes common to both builds
++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper;
buildInputs = [
ncurses openssl zlib pcre2 libiconv curl
] ++ optionals stdenv.hostPlatform.isLinux [ liburing systemd libkrb5 ]
++ optionals stdenv.hostPlatform.isDarwin [ perl cctools CoreServices ]
curl libiconv ncurses openssl pcre2 zlib
] ++ optionals stdenv.hostPlatform.isLinux [ libkrb5 liburing systemd ]
++ optionals stdenv.hostPlatform.isDarwin [ CoreServices cctools perl ]
++ optional (!stdenv.hostPlatform.isDarwin) [ jemalloc ];
prePatch = ''
@@ -152,15 +158,15 @@ server = stdenv.mkDerivation (common // {
outputs = [ "out" "man" ];
nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev ];
nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev flex ];
buildInputs = common.buildInputs ++ [
bzip2 lz4 lzo snappy xz zstd
libxml2 judy libevent cracklib
cracklib judy libevent libxml2
] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) numactl
++ optionals withStorageMroonga [ kytea libsodium msgpack zeromq ]
++ optionals stdenv.hostPlatform.isLinux [ linux-pam pmdk.dev ]
++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv;
++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv
++ optionals withStorageMroonga [ kytea libsodium msgpack zeromq ];
patches = common.patches;
@@ -202,7 +208,7 @@ server = stdenv.mkDerivation (common // {
'';
postInstall = common.postInstall + ''
rm -rf "$out"/share/aclocal
rm -r "$out"/share/aclocal
chmod +x "$out"/bin/wsrep_sst_common
rm "$out"/bin/{mariadb-client-test,mariadb-test,mysql_client_test,mysqltest}
'' + optionalString withStorageMroonga ''