2022-10-30 15:09:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2024-04-21 15:54:59 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, python3
|
2022-10-30 15:09:59 +00:00
|
|
|
, pkg-config
|
2024-04-21 15:54:59 +00:00
|
|
|
, libbacktrace
|
2022-10-30 15:09:59 +00:00
|
|
|
, bzip2
|
2024-04-21 15:54:59 +00:00
|
|
|
, lz4
|
|
|
|
, postgresql
|
2022-10-30 15:09:59 +00:00
|
|
|
, libxml2
|
2024-04-21 15:54:59 +00:00
|
|
|
, libyaml
|
2022-10-30 15:09:59 +00:00
|
|
|
, zlib
|
2024-04-21 15:54:59 +00:00
|
|
|
, libssh2
|
2022-10-30 15:09:59 +00:00
|
|
|
, zstd
|
|
|
|
}:
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pgbackrest";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "2.52";
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pgbackrest";
|
|
|
|
repo = "pgbackrest";
|
|
|
|
rev = "release/${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-S2KmKPqjZ64RQMJ+vt827AIzaWlnEUoP3Npr2/FIZM8=";
|
2022-10-30 15:09:59 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
python3
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libbacktrace
|
|
|
|
bzip2
|
|
|
|
lz4
|
|
|
|
postgresql
|
|
|
|
libxml2
|
|
|
|
libyaml
|
|
|
|
zlib
|
|
|
|
libssh2
|
|
|
|
zstd
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm555 -t "$out/bin" src/pgbackrest
|
2022-10-30 15:09:59 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
runHook postInstall
|
2022-10-30 15:09:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Reliable PostgreSQL backup & restore";
|
|
|
|
homepage = "https://pgbackrest.org/";
|
|
|
|
changelog = "https://github.com/pgbackrest/pgbackrest/releases";
|
|
|
|
license = licenses.mit;
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "pgbackrest";
|
2022-10-30 15:09:59 +00:00
|
|
|
maintainers = with maintainers; [ zaninime ];
|
|
|
|
};
|
|
|
|
}
|