From be52b4640f72d5489407728983dcca236affba72 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Tue, 16 Nov 2021 09:36:33 +0300 Subject: [PATCH] mariadb: move fix mytop to common stage --- pkgs/servers/sql/mariadb/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index a46fdd1ee36d..ce592eb457db 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -30,7 +30,8 @@ common = rec { # attributes common to both builds }; nativeBuildInputs = [ cmake pkg-config ] - ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames + ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper; buildInputs = [ ncurses openssl zlib pcre2 libiconv curl @@ -96,6 +97,11 @@ common = rec { # attributes common to both builds rm -r $out/lib/pkgconfig ''; + # perlPackages.DBDmysql is broken on darwin + postFixup = optionalString (!stdenv.hostPlatform.isDarwin) '' + wrapProgram $out/bin/mytop --set PATH ${makeBinPath [ less ncurses ]} + ''; + passthru.mysqlVersion = "5.7"; passthru.tests = { @@ -146,7 +152,7 @@ server = stdenv.mkDerivation (common // { outputs = [ "out" "man" ]; - nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev ] ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper; + nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev ]; buildInputs = common.buildInputs ++ [ bzip2 lz4 lzo snappy xz zstd @@ -207,11 +213,6 @@ server = stdenv.mkDerivation (common // { rm -r "$out"/OFF ''; - # perlPackages.DBDmysql is broken on darwin - postFixup = optionalString (!stdenv.hostPlatform.isDarwin) '' - wrapProgram $out/bin/mytop --set PATH ${makeBinPath [ less ncurses ]} - ''; - CXXFLAGS = optionalString stdenv.hostPlatform.isi686 "-fpermissive"; }); in mariadb