at 23.11-beta 39 lines 1.2 kB view raw
1{ lib, fetchFromGitHub, rustPlatform, stdenv, Security, installShellFiles, nix-update-script }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "rustic-rs"; 5 version = "0.6.1"; 6 7 src = fetchFromGitHub { 8 owner = "rustic-rs"; 9 repo = "rustic"; 10 rev = "refs/tags/v${version}"; 11 hash = "sha256-rpIEgQYwfManfgTrhCt6/Q4VBY2yyn4edC6/mz5D7nM="; 12 }; 13 14 cargoHash = "sha256-q+K887jPB9i9iXpFYXjn3zppAPWNlTc2AG7ivOr77J4="; 15 16 nativeBuildInputs = [ installShellFiles ]; 17 18 buildInputs = lib.optionals stdenv.isDarwin [ Security ]; 19 20 postInstall = '' 21 for shell in {ba,fi,z}sh; do 22 $out/bin/rustic completions $shell > rustic.$shell 23 done 24 25 installShellCompletion rustic.{ba,fi,z}sh 26 ''; 27 28 passthru.updateScript = nix-update-script { }; 29 30 meta = { 31 homepage = "https://github.com/rustic-rs/rustic"; 32 changelog = "https://github.com/rustic-rs/rustic/blob/${src.rev}/CHANGELOG.md"; 33 description = "fast, encrypted, deduplicated backups powered by pure Rust"; 34 mainProgram = "rustic"; 35 platforms = lib.platforms.linux ++ lib.platforms.darwin; 36 license = [ lib.licenses.mit lib.licenses.asl20 ]; 37 maintainers = [ lib.maintainers.nobbz ]; 38 }; 39}