2022-08-21 13:32:41 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, openssl, postgresql, zstd, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "odyssey";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "1.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yandex";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "sha256-1ALTKRjpKmmFcAuhmgpcbJBkNuUlTyau8xWDRHh7gf0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
patches = [
|
|
|
|
# Fix compression build. Remove with the next release. https://github.com/yandex/odyssey/pull/441
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/yandex/odyssey/commit/01ca5b345c4483add7425785c9c33dfa2c135d63.patch";
|
|
|
|
sha256 = "sha256-8UPkZkiI08ZZL6GShhug/5/kOVrmdqYlsD1bcqfxg/w=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2022-07-14 12:49:19 +00:00
|
|
|
buildInputs = [ openssl postgresql zstd ];
|
2022-08-21 13:32:41 +00:00
|
|
|
cmakeFlags = [ "-DPQ_LIBRARY=${postgresql.lib}/lib" "-DBUILD_COMPRESSION=ON" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 -t $out/bin sources/odyssey
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Scalable PostgreSQL connection pooler";
|
|
|
|
homepage = "https://github.com/yandex/odyssey";
|
|
|
|
license = licenses.bsd3;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "odyssey";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|