571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, brotli, libsodium, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "wal-g";
|
|
version = "3.0.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "wal-g";
|
|
repo = "wal-g";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-r46svvUAMjZx+Oc/vTWet9iZLEiXkRFevUz4x0OixVI=";
|
|
};
|
|
|
|
vendorHash = "sha256-CfXLeFQA7ix1DP+DB5qWQryS2tLFNlfZrA3OBYxIpjU=";
|
|
|
|
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
|
|
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 = [ ];
|
|
};
|
|
}
|