Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
installShellFiles,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "rustic";
version = "0.10.0";
src = fetchFromGitHub {
owner = "rustic-rs";
repo = "rustic";
tag = "v${version}";
hash = "sha256-KyJce0pTTpPv3K0WXWQv2MPx8dDGhUVYEIjTeYH1KPY=";
};
cargoHash = "sha256-Axiq1Yu5pg3fZ/E8aYFGAuPi3KVIlotQ2TZs0pczG+4=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd rustic \
--bash <($out/bin/rustic completions bash) \
--fish <($out/bin/rustic completions fish) \
--zsh <($out/bin/rustic completions zsh)
'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/rustic-rs/rustic";
changelog = "https://github.com/rustic-rs/rustic/blob/${src.rev}/CHANGELOG.md";
description = "Fast, encrypted, deduplicated backups powered by pure Rust";
mainProgram = "rustic";
platforms = lib.platforms.linux ++ lib.platforms.darwin;
license = [
lib.licenses.mit
lib.licenses.asl20
];
maintainers = [
lib.maintainers.nobbz
lib.maintainers.pmw
];
};
}