Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 installShellFiles, 6}: 7 8rustPlatform.buildRustPackage rec { 9 pname = "httm"; 10 version = "0.48.4"; 11 12 src = fetchFromGitHub { 13 owner = "kimono-koans"; 14 repo = "httm"; 15 rev = version; 16 hash = "sha256-636Two3kGtzpx6gQfvBKhhz5BQflP8joYpw0CY5UnoA="; 17 }; 18 19 cargoHash = "sha256-95xqzwFcTusL50Ue6dsM2BhD6J2Fi/qsrGQYniFVVd4="; 20 21 nativeBuildInputs = [ installShellFiles ]; 22 23 postPatch = '' 24 chmod +x scripts/*.bash 25 patchShebangs scripts/*.bash 26 ''; 27 28 postInstall = '' 29 installManPage httm.1 30 31 installShellCompletion --cmd httm \ 32 --zsh scripts/httm-key-bindings.zsh 33 34 for script in scripts/*.bash; do 35 install -Dm755 "$script" "$out/bin/$(basename "$script" .bash)" 36 done 37 38 install -Dm644 README.md $out/share/doc/README.md 39 ''; 40 41 meta = { 42 description = "Interactive, file-level Time Machine-like tool for ZFS/btrfs"; 43 homepage = "https://github.com/kimono-koans/httm"; 44 changelog = "https://github.com/kimono-koans/httm/releases/tag/${version}"; 45 license = lib.licenses.mpl20; 46 maintainers = with lib.maintainers; [ wyndon ]; 47 mainProgram = "httm"; 48 }; 49}