depot/third_party/nixpkgs/pkgs/tools/backup/autorestic/default.nix
Default email d9e13ed064 Project import generated by Copybara.
GitOrigin-RevId: a930f7da84786807bb105df40e76b541604c3e72
2021-09-22 23:38:15 +08:00

32 lines
916 B
Nix

{ lib, fetchFromGitHub, installShellFiles, buildGoModule }:
buildGoModule rec {
pname = "autorestic";
version = "1.2.0";
src = fetchFromGitHub {
owner = "cupcakearmy";
repo = pname;
rev = "v${version}";
sha256 = "yQgSJ0SQNWPMyrYn8rep+1b549HP8sOERh+kOiAK3+c=";
};
vendorSha256 = "7648gAguqeqLKFS9xRcx20wpSLb+ykZ7rOqR5PKe71o=";
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;
};
}