2021-09-18 02:26:33 +01:00
|
|
|
{ lib, fetchFromGitHub, installShellFiles, buildGoModule }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "autorestic";
|
2022-05-02 20:20:37 +01:00
|
|
|
version = "1.7.1";
|
2021-09-18 02:26:33 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cupcakearmy";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-05-02 20:20:37 +01:00
|
|
|
sha256 = "sha256-UUK5C26wM8LKQ7TE6DWEfzq+uPXH09B2Nybkfuqk+1o=";
|
2021-09-18 02:26:33 +01:00
|
|
|
};
|
|
|
|
|
2022-05-02 20:20:37 +01:00
|
|
|
vendorSha256 = "sha256-eB24vCElnnk3EMKniCblmeRsFk0BQ0wFeBf0B8OPanE=";
|
2021-09-18 02:26:33 +01:00
|
|
|
|
|
|
|
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 ];
|
2022-05-02 20:20:37 +01:00
|
|
|
mainProgram = "autorestic";
|
2021-09-18 02:26:33 +01:00
|
|
|
};
|
|
|
|
}
|