diff --git a/pkgs/tools/backup/pgbackrest/default.nix b/pkgs/tools/backup/pgbackrest/default.nix new file mode 100644 index 000000000000..7e66c4fb8d4e --- /dev/null +++ b/pkgs/tools/backup/pgbackrest/default.nix @@ -0,0 +1,39 @@ +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, postgresql +, openssl +, lz4 +, bzip2 +, libxml2 +, zlib +, zstd +, libyaml +}: +stdenv.mkDerivation rec { + pname = "pgbackrest"; + version = "2.41"; + + src = fetchFromGitHub { + owner = "pgbackrest"; + repo = "pgbackrest"; + rev = "release/${version}"; + sha256 = "sha256-AaFctLXhzq3Wk+KjxskxazpNEX7UAmXeiJxhYXYwksk="; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ postgresql openssl lz4 bzip2 libxml2 zlib zstd libyaml ]; + + postUnpack = '' + sourceRoot+=/src + ''; + + meta = with lib; { + description = "Reliable PostgreSQL backup & restore"; + homepage = "https://pgbackrest.org/"; + changelog = "https://github.com/pgbackrest/pgbackrest/releases"; + license = licenses.mit; + maintainers = with maintainers; [ zaninime ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d29ed9613cdd..c4db3c82c584 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7565,6 +7565,8 @@ with pkgs; pgf_graphics = callPackage ../tools/graphics/pgf { }; + pgbackrest = callPackage ../tools/backup/pgbackrest { }; + pgformatter = callPackage ../development/tools/pgformatter { }; pgloader = callPackage ../development/tools/pgloader { };