2021-06-04 09:07:49 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, brotli, libsodium }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "wal-g";
|
2021-06-04 09:07:49 +00:00
|
|
|
version = "1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wal-g";
|
|
|
|
repo = "wal-g";
|
|
|
|
rev = "v${version}";
|
2021-06-04 09:07:49 +00:00
|
|
|
sha256 = "0al8xg57fh3zqwgmm6lkcnpnisividhqld9jry3sqk2k45856y8j";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
vendorSha256 = "0n0ymgcgkjlp0indih8h55jjj6372rdfcq717kwln6sxm4r9mb17";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
buildInputs = [ brotli libsodium ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subPackages = [ "main/pg" ];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
buildFlagsArray = [
|
2021-06-04 09:07:49 +00:00
|
|
|
"-tags=brotli libsodium"
|
2021-03-09 03:18:52 +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-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/pg $out/bin/wal-g
|
|
|
|
'';
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/wal-g/wal-g";
|
2020-08-20 17:08:02 +00:00
|
|
|
license = licenses.asl20;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An archival restoration tool for PostgreSQL";
|
2020-12-09 12:39:15 +00:00
|
|
|
maintainers = with maintainers; [ marsam ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|