Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 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.5.3"; 6 7 src = fetchFromGitHub { 8 owner = "rustic-rs"; 9 repo = "rustic"; 10 rev = "refs/tags/v${version}"; 11 hash = "sha256-OZ80foq6DQZoJuJsQT4hxAHvzYn+uJbqG29wiZ7mPi8="; 12 }; 13 14 cargoHash = "sha256-xdSAdw6YY6mYZDBKkH20wfB1oNiKecC7XhRKLUaHsTQ="; 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/${version}.txt"; 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}