2021-09-18 03:26:33 +02:00
|
|
|
{ lib, fetchFromGitHub, installShellFiles, buildGoModule }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "autorestic";
|
2022-03-15 02:22:51 +01:00
|
|
|
version = "1.5.7";
|
2021-09-18 03:26:33 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cupcakearmy";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-03-15 02:22:51 +01:00
|
|
|
sha256 = "sha256-o3SO3y26ur16D20rTYtzfyZWNDbeOzvj/BpMykvG698=";
|
2021-09-18 03:26:33 +02:00
|
|
|
};
|
|
|
|
|
2022-03-15 02:22:51 +01:00
|
|
|
vendorSha256 = "sha256-qYXdRpQT7x+Y5h8PuKGjsANXLqjNlsPKO76GQhnufTU=";
|
2021-09-18 03:26:33 +02: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 ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|