Files
nixpkgs/pkgs/by-name/ht/httm/package.nix
2026-06-05 08:16:25 +00:00

50 lines
1.2 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "httm";
version = "0.50.0";
src = fetchFromGitHub {
owner = "kimono-koans";
repo = "httm";
rev = finalAttrs.version;
hash = "sha256-+19Xu42Tp0WkhdmhfFOAbSrTZ3SSQRgbOQwZY8KrFJg=";
};
cargoHash = "sha256-HdYBWbyl5FSOf/hgtXV3BbjpXfrM/6EJpDese5hBNzk=";
nativeBuildInputs = [ installShellFiles ];
postPatch = ''
chmod +x scripts/*.bash
patchShebangs scripts/*.bash
'';
postInstall = ''
installManPage httm.1
installShellCompletion --cmd httm \
--zsh scripts/httm-key-bindings.zsh
for script in scripts/*.bash; do
install -Dm755 "$script" "$out/bin/$(basename "$script" .bash)"
done
install -Dm644 README.md $out/share/doc/README.md
'';
meta = {
description = "Interactive, file-level Time Machine-like tool for ZFS/btrfs";
homepage = "https://github.com/kimono-koans/httm";
changelog = "https://github.com/kimono-koans/httm/releases/tag/${finalAttrs.version}";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ wyndon ];
mainProgram = "httm";
};
})