mariadb-galera: move to external package
This commit is contained in:
parent
3def2b4b6a
commit
e2bd655822
4 changed files with 74 additions and 57 deletions
|
@ -18,12 +18,6 @@ mytopEnv = perl.withPackages (p: with p; [ DataDumper DBDmysql DBI TermReadKey ]
|
|||
mariadb = server // {
|
||||
inherit client; # MariaDB Client
|
||||
server = server; # MariaDB Server
|
||||
inherit galera;
|
||||
};
|
||||
|
||||
galeraLibs = buildEnv {
|
||||
name = "galera-lib-inputs-united";
|
||||
paths = [ openssl.out boost check ];
|
||||
};
|
||||
|
||||
common = rec { # attributes common to both builds
|
||||
|
@ -215,54 +209,4 @@ server = stdenv.mkDerivation (common // {
|
|||
|
||||
CXXFLAGS = optionalString stdenv.isi686 "-fpermissive";
|
||||
});
|
||||
|
||||
galera = stdenv.mkDerivation rec {
|
||||
pname = "mariadb-galera";
|
||||
version = "25.3.26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "codership";
|
||||
repo = "galera";
|
||||
rev = "release_${version}";
|
||||
sha256 = "0fs0c1px9lknf1a5wwb12z1hj7j7b6hsfjddggikvkdkrnr2xs1f";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
buildInputs = [ asio boost check openssl scons ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace SConstruct \
|
||||
--replace "boost_library_path = '''" "boost_library_path = '${boost}/lib'"
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
export CPPFLAGS="-I${asio}/include -I${boost.dev}/include -I${check}/include -I${openssl.dev}/include"
|
||||
export LIBPATH="${galeraLibs}/lib"
|
||||
'';
|
||||
|
||||
sconsFlags = "ssl=1 system_asio=0 strict_build_flags=0";
|
||||
|
||||
installPhase = ''
|
||||
# copied with modifications from scripts/packages/freebsd.sh
|
||||
GALERA_LICENSE_DIR="$share/licenses/${pname}-${version}"
|
||||
install -d $out/{bin,lib/galera,share/doc/galera,$GALERA_LICENSE_DIR}
|
||||
install -m 555 "garb/garbd" "$out/bin/garbd"
|
||||
install -m 444 "libgalera_smm.so" "$out/lib/galera/libgalera_smm.so"
|
||||
install -m 444 "scripts/packages/README" "$out/share/doc/galera/"
|
||||
install -m 444 "scripts/packages/README-MySQL" "$out/share/doc/galera/"
|
||||
install -m 444 "scripts/packages/freebsd/LICENSE" "$out/$GALERA_LICENSE_DIR"
|
||||
install -m 444 "LICENSE" "$out/$GALERA_LICENSE_DIR/GPLv2"
|
||||
install -m 444 "asio/LICENSE_1_0.txt" "$out/$GALERA_LICENSE_DIR/LICENSE.asio"
|
||||
install -m 444 "www.evanjones.ca/LICENSE" "$out/$GALERA_LICENSE_DIR/LICENSE.crc32c"
|
||||
install -m 444 "chromium/LICENSE" "$out/$GALERA_LICENSE_DIR/LICENSE.chromium"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Galera 3 wsrep provider library";
|
||||
homepage = http://galeracluster.com/;
|
||||
license = licenses.lgpl2;
|
||||
maintainers = with maintainers; [ izorkin ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
in mariadb
|
||||
|
|
6
pkgs/servers/sql/mariadb/galera/25.nix
Normal file
6
pkgs/servers/sql/mariadb/galera/25.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ callPackage, ... } @ args:
|
||||
|
||||
callPackage ./. (args // {
|
||||
version = "25.3.26";
|
||||
sha256 = "0fs0c1px9lknf1a5wwb12z1hj7j7b6hsfjddggikvkdkrnr2xs1f";
|
||||
})
|
63
pkgs/servers/sql/mariadb/galera/default.nix
Normal file
63
pkgs/servers/sql/mariadb/galera/default.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ stdenv, fetchFromGitHub, buildEnv
|
||||
, asio, boost, check, openssl, scons
|
||||
, version, sha256, ...
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "mariadb-galera";
|
||||
galeraLibs = buildEnv {
|
||||
name = "galera-lib-inputs-united";
|
||||
paths = [ openssl.out boost check ];
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
inherit pname;
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "codership";
|
||||
repo = "galera";
|
||||
rev = "release_${version}";
|
||||
inherit sha256;
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
buildInputs = [ asio boost check openssl scons ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace SConstruct \
|
||||
--replace "boost_library_path = '''" "boost_library_path = '${boost}/lib'"
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
export CPPFLAGS="-I${asio}/include -I${boost.dev}/include -I${check}/include -I${openssl.dev}/include"
|
||||
export LIBPATH="${galeraLibs}/lib"
|
||||
'';
|
||||
|
||||
sconsFlags = "ssl=1 system_asio=1 strict_build_flags=0";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
# copied with modifications from scripts/packages/freebsd.sh
|
||||
GALERA_LICENSE_DIR="$share/licenses/${pname}"
|
||||
install -d $out/{bin,lib/galera,share/doc/galera,$GALERA_LICENSE_DIR}
|
||||
install -m 555 "garb/garbd" "$out/bin/garbd"
|
||||
install -m 444 "libgalera_smm.so" "$out/lib/galera/libgalera_smm.so"
|
||||
install -m 444 "scripts/packages/README" "$out/share/doc/galera/"
|
||||
install -m 444 "scripts/packages/README-MySQL" "$out/share/doc/galera/"
|
||||
install -m 444 "scripts/packages/freebsd/LICENSE" "$out/$GALERA_LICENSE_DIR"
|
||||
install -m 444 "LICENSE" "$out/$GALERA_LICENSE_DIR/GPLv2"
|
||||
install -m 444 "asio/LICENSE_1_0.txt" "$out/$GALERA_LICENSE_DIR/LICENSE.asio"
|
||||
install -m 444 "www.evanjones.ca/LICENSE" "$out/$GALERA_LICENSE_DIR/LICENSE.crc32c"
|
||||
install -m 444 "chromium/LICENSE" "$out/$GALERA_LICENSE_DIR/LICENSE.chromium"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Galera 3 wsrep provider library";
|
||||
homepage = http://galeracluster.com/;
|
||||
license = licenses.lgpl2;
|
||||
maintainers = with maintainers; [ izorkin ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
|
@ -14891,8 +14891,12 @@ in
|
|||
mariadb-connector-c_2_3 = callPackage ../servers/sql/mariadb/connector-c/2_3.nix { };
|
||||
mariadb-connector-c_3_1 = callPackage ../servers/sql/mariadb/connector-c/3_1.nix { };
|
||||
|
||||
mariadb = callPackage ../servers/sql/mariadb {
|
||||
mariadb-galera = mariadb-galera_25;
|
||||
mariadb-galera_25 = callPackage ../servers/sql/mariadb/galera/25.nix {
|
||||
asio = asio_1_10;
|
||||
};
|
||||
|
||||
mariadb = callPackage ../servers/sql/mariadb {
|
||||
# As per mariadb's cmake, "static jemalloc_pic.a can only be used up to jemalloc 4".
|
||||
# https://jira.mariadb.org/browse/MDEV-15034
|
||||
jemalloc = jemalloc450.override ({ disableInitExecTls = true; });
|
||||
|
|
Loading…
Reference in a new issue