diff --git a/pkgs/tools/backup/rustic-rs/default.nix b/pkgs/tools/backup/rustic-rs/default.nix new file mode 100644 index 000000000000..4d98fce5c60a --- /dev/null +++ b/pkgs/tools/backup/rustic-rs/default.nix @@ -0,0 +1,36 @@ +{ lib, fetchFromGitHub, rustPlatform, stdenv, darwin, installShellFiles }: + +rustPlatform.buildRustPackage rec { + pname = "rustic-rs"; + version = "0.3.2"; + + src = fetchFromGitHub { + owner = "rustic-rs"; + repo = "rustic"; + rev = "v${version}"; + hash = "sha256-MGFtJUfPK6IH3w8xe/RZaXS+QDIVS3jFSnf4VYiSLM4="; + }; + + cargoHash = "sha256-siJrqL7HjUQvcyXpUN5rQWNeQNBc+693N1xTSvlOixI="; + + nativeBuildInputs = [ installShellFiles ]; + + buildInputs = lib.optionals stdenv.isDarwin [ darwin.Security ]; + + 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"; + platforms = lib.platforms.linux ++ lib.platforms.darwin; + license = [ lib.licenses.mit lib.licenses.asl20 ]; + maintainers = [ lib.maintainers.nobbz ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a70dd9e0494c..dd8067ebf796 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24433,6 +24433,8 @@ with pkgs; roon-server = callPackage ../servers/roon-server { }; + rustic-rs = callPackage ../tools/backup/rustic-rs { }; + supervise = callPackage ../tools/system/supervise { }; spamassassin = callPackage ../servers/mail/spamassassin { };