2022-05-19 04:20:00 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, brotli, libsodium, installShellFiles }:
|
2018-04-09 08:39:02 +00:00
|
|
|
|
2020-03-24 09:20:00 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "wal-g";
|
2024-03-17 15:55:00 +00:00
|
|
|
version = "3.0.0";
|
2018-04-09 08:39:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-03-24 09:20:00 +00:00
|
|
|
owner = "wal-g";
|
|
|
|
repo = "wal-g";
|
|
|
|
rev = "v${version}";
|
2024-03-17 15:55:00 +00:00
|
|
|
sha256 = "sha256-k+GaOb+o5b+Rmggk+Wq3NscDS+fIvyK0e/EhX6UMlqM=";
|
2017-11-17 13:44:03 +00:00
|
|
|
};
|
2018-04-09 08:39:02 +00:00
|
|
|
|
2024-03-17 15:55:00 +00:00
|
|
|
vendorHash = "sha256-ZsVqR02D4YmZP/tVz2UWpXa6fM7HU7Hi2CSnvuVx9UU=";
|
2022-05-19 04:20:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2018-11-25 08:57:22 +00:00
|
|
|
|
2021-06-01 04:20:00 +00:00
|
|
|
buildInputs = [ brotli libsodium ];
|
2020-02-18 09:20:00 +00:00
|
|
|
|
|
|
|
subPackages = [ "main/pg" ];
|
|
|
|
|
2021-08-07 02:28:40 +00:00
|
|
|
tags = [ "brotli" "libsodium" ];
|
|
|
|
|
2024-03-17 15:55:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/wal-g/wal-g/cmd/pg.walgVersion=${version}" "-X github.com/wal-g/wal-g/cmd/pg.gitRevision=${src.rev}" ];
|
2020-02-18 09:20:00 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2020-03-24 09:20:00 +00:00
|
|
|
mv $out/bin/pg $out/bin/wal-g
|
2022-05-19 04:20:00 +00:00
|
|
|
installShellCompletion --cmd wal-g \
|
|
|
|
--bash <($out/bin/wal-g completion bash) \
|
|
|
|
--zsh <($out/bin/wal-g completion zsh)
|
2020-02-18 09:20:00 +00:00
|
|
|
'';
|
|
|
|
|
2020-08-14 04:20:00 +00:00
|
|
|
meta = with lib; {
|
2020-02-18 09:20:00 +00:00
|
|
|
homepage = "https://github.com/wal-g/wal-g";
|
2020-08-14 04:20:00 +00:00
|
|
|
license = licenses.asl20;
|
2020-02-18 09:20:00 +00:00
|
|
|
description = "An archival restoration tool for PostgreSQL";
|
2020-12-07 14:26:45 +00:00
|
|
|
maintainers = with maintainers; [ marsam ];
|
2017-11-17 13:44:03 +00:00
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|