2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, buildEnv
|
2021-05-20 23:08:51 +00:00
|
|
|
, asio, boost, check, openssl, cmake
|
2023-07-15 17:15:38 +00:00
|
|
|
, 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-02-07 01:22:34 +00:00
|
|
|
version = "26.4.17";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "codership";
|
|
|
|
repo = "galera";
|
|
|
|
rev = "release_${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-XcaHg0mqCGqP7VYb4jLSxuNxmBXJv2ivA/1spMyT4Tg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
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";
|
|
|
|
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;
|
2023-04-12 12:48:02 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|