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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, brotli, libsodium, installShellFiles }:
buildGoModule rec {
pname = "wal-g";
version = "2.0.0";
src = fetchFromGitHub {
owner = "wal-g";
repo = "wal-g";
rev = "v${version}";
sha256 = "sha256-xltKchk7RtP5tkoUhnJqVb17WW6qW/lSFdHivCbW5zY=";
2017-11-17 13:44:03 +00:00
};
vendorSha256 = "sha256-w9AVcld8Gd1kYE2PkN8RVZ+/xlOZChKoWZFKvqhJuWI=";
nativeBuildInputs = [ installShellFiles ];
2018-11-25 08:57:22 +00:00
buildInputs = [ brotli libsodium ];
2020-02-18 09:20:00 +00:00
subPackages = [ "main/pg" ];
tags = [ "brotli" "libsodium" ];
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
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";
maintainers = with maintainers; [ marsam ];
2017-11-17 13:44:03 +00:00
};
}