From 595511e63283fb705c98c07732d63755a729bf5e Mon Sep 17 00:00:00 2001 From: Izorkin Date: Tue, 16 Nov 2021 10:53:46 +0300 Subject: [PATCH] mariadb: cleanup build configuration --- pkgs/servers/sql/mariadb/default.nix | 32 +++++++++++++++++----------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 540382a27c41..fca3bdedf9fb 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -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 ''