nixpkgs/pkgs/tools/backup/autorestic/default.nix

33 lines
930 B
Nix
Raw Normal View History

2021-09-18 03:26:33 +02:00
{ lib, fetchFromGitHub, installShellFiles, buildGoModule }:
buildGoModule rec {
pname = "autorestic";
2021-10-29 03:17:00 +02:00
version = "1.3.0";
2021-09-18 03:26:33 +02:00
src = fetchFromGitHub {
owner = "cupcakearmy";
repo = pname;
rev = "v${version}";
2021-10-29 03:17:00 +02:00
sha256 = "sha256-kd4nhfqKbJM7w1Prqiy+UBaa2SmZDgeSZzZTXTZ30yA=";
2021-09-18 03:26:33 +02:00
};
2021-10-29 03:17:00 +02:00
vendorSha256 = "sha256-eKsPdmPJXiCwvb2A28tNxF4xStry3iA6aLb+XYFJYSg=";
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;
};
}