nixpkgs/pkgs/tools/backup/wal-g/default.nix

37 lines
870 B
Nix
Raw Normal View History

2018-11-25 09:57:22 +01:00
{ stdenv, buildGoPackage, fetchFromGitHub, brotli }:
2017-11-17 14:44:03 +01:00
buildGoPackage rec {
pname = "wal-g";
2020-02-18 10:20:00 +01:00
version = "0.2.14";
src = fetchFromGitHub {
owner = "wal-g";
repo = "wal-g";
rev = "v${version}";
2020-02-18 10:20:00 +01:00
sha256 = "0rrn9kzcg3nw9qvzy58m4qacghv0pj7iyjh4yspc71n5nkamkfgm";
2017-11-17 14:44:03 +01:00
};
2018-11-25 09:57:22 +01:00
buildInputs = [ brotli ];
doCheck = true;
2017-11-17 14:44:03 +01:00
goPackagePath = "github.com/wal-g/wal-g";
2020-02-18 10:20:00 +01:00
goDeps = ./deps.nix;
subPackages = [ "main/pg" ];
buildFlagsArray = [ "-ldflags=-s -w -X ${goPackagePath}/cmd/pg.WalgVersion=${version} -X ${goPackagePath}/cmd/pg.GitRevision=${src.rev}" ];
postInstall = ''
mv $bin/bin/pg $bin/bin/wal-g
'';
2017-11-17 14:44:03 +01:00
meta = {
2020-02-18 10:20:00 +01:00
homepage = "https://github.com/wal-g/wal-g";
license = stdenv.lib.licenses.asl20;
2020-02-18 10:20:00 +01:00
description = "An archival restoration tool for PostgreSQL";
2017-11-17 14:44:03 +01:00
maintainers = [ stdenv.lib.maintainers.ocharles ];
};
}