2020-08-14 06:20:00 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, brotli }:
|
2018-04-09 10:39:02 +02:00
|
|
|
|
2020-03-24 10:20:00 +01:00
|
|
|
buildGoModule rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "wal-g";
|
2021-04-09 06:20:00 +02:00
|
|
|
version = "0.2.21";
|
2018-04-09 10:39:02 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-03-24 10:20:00 +01:00
|
|
|
owner = "wal-g";
|
|
|
|
repo = "wal-g";
|
|
|
|
rev = "v${version}";
|
2021-04-09 06:20:00 +02:00
|
|
|
sha256 = "0pinvi2b3vi6lvw3im8w6vcjm1qg2kbf6ydf1h72xjz5933yrjy4";
|
2017-11-17 14:44:03 +01:00
|
|
|
};
|
2018-04-09 10:39:02 +02:00
|
|
|
|
2021-04-09 06:20:00 +02:00
|
|
|
vendorSha256 = "0qzw0lr0x6kqlpa4kghrfl2271752sr7idk6n4hkhk6q0kghcsnk";
|
2018-11-25 09:57:22 +01:00
|
|
|
|
2020-04-13 04:57:41 +02:00
|
|
|
buildInputs = [ brotli ];
|
2020-02-18 10:20:00 +01:00
|
|
|
|
|
|
|
subPackages = [ "main/pg" ];
|
|
|
|
|
2021-03-01 17:05:51 +01:00
|
|
|
buildFlagsArray = [
|
|
|
|
"-tags=brotli"
|
|
|
|
"-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 10:20:00 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2020-03-24 10:20:00 +01:00
|
|
|
mv $out/bin/pg $out/bin/wal-g
|
2020-02-18 10:20:00 +01:00
|
|
|
'';
|
|
|
|
|
2020-08-14 06:20:00 +02:00
|
|
|
meta = with lib; {
|
2020-02-18 10:20:00 +01:00
|
|
|
homepage = "https://github.com/wal-g/wal-g";
|
2020-08-14 06:20:00 +02:00
|
|
|
license = licenses.asl20;
|
2020-02-18 10:20:00 +01:00
|
|
|
description = "An archival restoration tool for PostgreSQL";
|
2020-12-07 15:26:45 +01:00
|
|
|
maintainers = with maintainers; [ marsam ];
|
2017-11-17 14:44:03 +01:00
|
|
|
};
|
2020-07-31 05:58:04 +02:00
|
|
|
}
|