depot/third_party/nixpkgs/pkgs/by-name/ru/rustic/package.nix
Default email 555cd8a8f9 Project import generated by Copybara.
GitOrigin-RevId: 5633bcff0c6162b9e4b5f1264264611e950c8ec7
2024-10-09 18:51:18 +02:00

54 lines
1.2 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
stdenv,
Security,
SystemConfiguration,
installShellFiles,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "rustic";
version = "0.9.1";
src = fetchFromGitHub {
owner = "rustic-rs";
repo = "rustic";
rev = "refs/tags/v${version}";
hash = "sha256-hkkylXJOhPOC4p+MOuYCzfcmCoHmm+/8afsaPFwD1/s=";
};
cargoHash = "sha256-Rh96vPLAxz8KCIk9y9TFB2fP0JngnM9LSsClWfgYUG0=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
Security
SystemConfiguration
];
postInstall = ''
for shell in {ba,fi,z}sh; do
$out/bin/rustic completions $shell > rustic.$shell
done
installShellCompletion rustic.{ba,fi,z}sh
'';
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 ];
};
}