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

35 lines
939 B
Nix
Raw Normal View History

{ stdenv, buildGoModule, fetchFromGitHub, brotli, Security }:
buildGoModule rec {
pname = "wal-g";
version = "0.2.15";
src = fetchFromGitHub {
owner = "wal-g";
repo = "wal-g";
rev = "v${version}";
sha256 = "1hslhs9i4wib6c74gdq9yail958ff1y11pymjww2xr84wkwd9v7i";
2017-11-17 13:44:03 +00:00
};
modSha256 = "0kwl5gwc5gc0cq2gldg13nvswp9wd90xiv1qb3g8yxcczywkpmrm";
2018-11-25 08:57:22 +00:00
buildInputs = [ brotli ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security ];
2020-02-18 09:20:00 +00:00
doCheck = true;
2020-02-18 09:20:00 +00:00
subPackages = [ "main/pg" ];
buildFlagsArray = [ "-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 = ''
mv $out/bin/pg $out/bin/wal-g
2020-02-18 09:20:00 +00:00
'';
2017-11-17 13:44:03 +00:00
meta = {
2020-02-18 09:20:00 +00:00
homepage = "https://github.com/wal-g/wal-g";
license = stdenv.lib.licenses.asl20;
2020-02-18 09:20:00 +00:00
description = "An archival restoration tool for PostgreSQL";
2017-11-17 13:44:03 +00:00
maintainers = [ stdenv.lib.maintainers.ocharles ];
};
}