mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
66 lines
1.4 KiB
Nix
66 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
clangStdenv,
|
|
fetchFromGitHub,
|
|
openssl,
|
|
pkg-config,
|
|
rustPlatform,
|
|
useMoldLinker,
|
|
versionCheckHook,
|
|
withMold ? with clangStdenv.hostPlatform; isLinux,
|
|
}:
|
|
let
|
|
stdenv = if withMold then useMoldLinker clangStdenv else clangStdenv;
|
|
in
|
|
rustPlatform.buildRustPackage.override { inherit stdenv; } (finalAttrs: {
|
|
pname = "pgdog";
|
|
version = "0.1.59";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pgdogdev";
|
|
repo = "pgdog";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-eFoWTm0fRnWvyANslTqLG5fw5NU+nrpevATWC747hgg=";
|
|
};
|
|
|
|
cargoHash = "sha256-DGdkYGIyTyD7aNP5nr9cMsuHJR7U8QMa+ML/R/wHnnU=";
|
|
|
|
# Hardcoded paths for C compiler and linker
|
|
postPatch = ''
|
|
rm .cargo/config.toml
|
|
'';
|
|
|
|
env.RUSTFLAGS = "--cfg tokio_unstable";
|
|
cargoBuildFlags = [
|
|
"--package"
|
|
"pgdog"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
];
|
|
|
|
strictDeps = true;
|
|
|
|
# Several tests rely on networking
|
|
doCheck = false;
|
|
|
|
doInstallCheck = true;
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
meta = {
|
|
description = "PostgreSQL connection pooler, load balancer, and database sharder";
|
|
homepage = "https://pgdog.dev/";
|
|
changelog = "https://github.com/pgdogdev/pgdog/releases/tag/v${finalAttrs.version}";
|
|
license = lib.licenses.agpl3Only;
|
|
mainProgram = "pgdog";
|
|
maintainers = with lib.maintainers; [ EpicEric ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
})
|