2022-11-27 09:42:12 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform, stdenv, Security, installShellFiles }:
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rustic-rs";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "0.4.4";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rustic-rs";
|
|
|
|
repo = "rustic";
|
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-irN5enJ0nyyzrLvnLXm7YhyEJ3nz9PQukzAfUrKmOzY=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
cargoHash = "sha256-wJuWeoS45ikP12S2o6aB2Iogw5HomXzCIjkFbp3rSR4=";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for shell in {ba,fi,z}sh; do
|
|
|
|
$out/bin/rustic completions $shell > rustic.$shell
|
|
|
|
done
|
|
|
|
|
|
|
|
installShellCompletion rustic.{ba,fi,z}sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/rustic-rs/rustic";
|
|
|
|
changelog = "https://github.com/rustic-rs/rustic/blob/${src.rev}/changelog/${version}.txt";
|
|
|
|
description = "fast, encrypted, deduplicated backups powered by pure Rust";
|
2022-11-27 09:42:12 +00:00
|
|
|
mainProgram = "rustic";
|
2022-11-21 17:40:18 +00:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
|
|
license = [ lib.licenses.mit lib.licenses.asl20 ];
|
|
|
|
maintainers = [ lib.maintainers.nobbz ];
|
|
|
|
};
|
|
|
|
}
|