blob: 72c3155861bb0b2eeec422612864d7e16777d3ae (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "pgcat";
version = "1.1.0";
src = fetchFromGitHub {
owner = "postgresml";
repo = "pgcat";
rev = "v${version}";
hash = "sha256-ESHBOh9JSzu6Zxh0z/+nebumi/zyFVdTK0DIwR/46Xo=";
};
cargoHash = "sha256-2wZADXEi8bfNgSQuL7yAmDYd/a0LOssdPFa/kvSSLFU=";
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
checkFlags = [
# requires network access
"--skip=dns_cache::CachedResolver::lookup_ip"
"--skip=dns_cache::CachedResolver::new"
"--skip=dns_cache::CachedResolver"
"--skip=dns_cache::tests::has_changed"
"--skip=dns_cache::tests::incorrect_address"
"--skip=dns_cache::tests::lookup_ip"
"--skip=dns_cache::tests::new"
"--skip=dns_cache::tests::thread"
"--skip=dns_cache::tests::unknown_host"
];
doInstallCheck = true;
installCheckPhase = ''
$out/bin/pgcat --version | grep "pgcat ${version}"
'';
meta = with lib; {
homepage = "https://github.com/postgresml/pgcat";
description = "PostgreSQL pooler with sharding, load balancing and failover support.";
license = with licenses; [mit];
platforms = platforms.unix;
maintainers = with maintainers; [cathalmullan];
};
}
|