mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-08 21:24:03 +00:00
![aleksana](/assets/img/avatar_default.png)
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, openssl, postgresql, zstd, fetchpatch }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "odyssey";
|
|
version = "1.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "yandex";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-1ALTKRjpKmmFcAuhmgpcbJBkNuUlTyau8xWDRHh7gf0=";
|
|
};
|
|
|
|
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=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ openssl postgresql zstd ];
|
|
cmakeFlags = [ "-DPQ_LIBRARY=${postgresql.lib}/lib" "-DBUILD_COMPRESSION=ON" ];
|
|
|
|
installPhase = ''
|
|
install -Dm755 -t $out/bin sources/odyssey
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Scalable PostgreSQL connection pooler";
|
|
homepage = "https://github.com/yandex/odyssey";
|
|
license = licenses.bsd3;
|
|
maintainers = [ ];
|
|
platforms = [ "x86_64-linux" ];
|
|
mainProgram = "odyssey";
|
|
};
|
|
}
|