Files
nixpkgs/pkgs/by-name/wa/wal-g/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.2 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
brotli,
libsodium,
installShellFiles,
}:
buildGoModule rec {
pname = "wal-g";
version = "3.0.7";
src = fetchFromGitHub {
owner = "wal-g";
repo = "wal-g";
rev = "v${version}";
sha256 = "sha256-kUn1pJEdGec+WIZivqVAhELoBTKOF4E07Ovn795DgIY=";
};
vendorHash = "sha256-TwYl3B/VS24clUv1ge/RroULIY/04xTxc11qPNGhnfs=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = [
brotli
libsodium
];
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}"
];
postInstall = ''
mv $out/bin/pg $out/bin/wal-g
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd wal-g \
--bash <($out/bin/wal-g completion bash) \
--zsh <($out/bin/wal-g completion zsh)
'';
meta = with lib; {
homepage = "https://github.com/wal-g/wal-g";
license = licenses.asl20;
description = "Archival restoration tool for PostgreSQL";
mainProgram = "wal-g";
maintainers = [ ];
};
}