2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
asio,
|
|
|
|
boost,
|
|
|
|
check,
|
|
|
|
openssl,
|
|
|
|
cmake,
|
|
|
|
nixosTests,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-05-15 21:57:56 +00:00
|
|
|
pname = "mariadb-galera";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "26.4.20";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "codership";
|
|
|
|
repo = "galera";
|
|
|
|
rev = "release_${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-R2YQtAuqPkOtcvjS5PPcqAqu153N2+0/WjZt96ZSI1A=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
buildInputs = [
|
|
|
|
asio
|
|
|
|
boost.dev
|
|
|
|
check
|
|
|
|
openssl
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
# make sure bundled asio cannot be used, but leave behind license, because it gets installed
|
|
|
|
rm -r asio/{asio,asio.hpp}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
postInstall = ''
|
|
|
|
# for backwards compatibility
|
|
|
|
mkdir $out/lib/galera
|
|
|
|
ln -s $out/lib/libgalera_smm.so $out/lib/galera/libgalera_smm.so
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) mariadb-galera;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Galera 3 wsrep provider library";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "garbd";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://galeracluster.com/";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.lgpl2Only;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ izorkin ] ++ teams.helsinki-systems.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
2024-09-26 11:04:55 +00:00
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|