depot/third_party/nixpkgs/pkgs/tools/backup/autorestic/default.nix
Default email b41113241d Project import generated by Copybara.
GitOrigin-RevId: ae1dc133ea5f1538d035af41e5ddbc2ebcb67b90
2022-09-22 14:36:57 +02:00

32 lines
909 B
Nix

{ lib, fetchFromGitHub, installShellFiles, buildGoModule }:
buildGoModule rec {
pname = "autorestic";
version = "1.7.3";
src = fetchFromGitHub {
owner = "cupcakearmy";
repo = pname;
rev = "v${version}";
sha256 = "sha256-/TTnviFfL56l5WJwNLTcVXccUss8uhvR9ZSkHZcisc8=";
};
vendorSha256 = "sha256-eB24vCElnnk3EMKniCblmeRsFk0BQ0wFeBf0B8OPanE=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd autorestic \
--bash <($out/bin/autorestic completion bash) \
--fish <($out/bin/autorestic completion fish) \
--zsh <($out/bin/autorestic completion zsh)
'';
meta = with lib; {
description = "High level CLI utility for restic";
homepage = "https://github.com/cupcakearmy/autorestic";
license = licenses.asl20;
maintainers = with maintainers; [ renesat ];
mainProgram = "autorestic";
};
}