depot/third_party/nixpkgs/pkgs/servers/sql/mariadb/galera/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

45 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, buildEnv
, asio, boost, check, openssl, cmake
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "mariadb-galera";
version = "26.4.16";
src = fetchFromGitHub {
owner = "codership";
repo = "galera";
rev = "release_${version}";
hash = "sha256-bRkXux4vpnUGRYO4dYD6IuWsbMglsMf17tBw6qpvbDg=";
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake ];
buildInputs = [ asio boost.dev check openssl ];
preConfigure = ''
# make sure bundled asio cannot be used, but leave behind license, because it gets installed
rm -r asio/{asio,asio.hpp}
'';
postInstall = ''
# for backwards compatibility
mkdir $out/lib/galera
ln -s $out/lib/libgalera_smm.so $out/lib/galera/libgalera_smm.so
'';
passthru.tests = {
inherit (nixosTests) mariadb-galera;
};
meta = with lib; {
description = "Galera 3 wsrep provider library";
homepage = "https://galeracluster.com/";
license = licenses.lgpl2Only;
maintainers = with maintainers; [ ajs124 izorkin ];
platforms = platforms.all;
broken = stdenv.isDarwin;
};
}