2024-07-27 06:49:29 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
installShellFiles,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "httm";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.40.1";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kimono-koans";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-iJs151HdwcSNlgbbSX/CKBOeGvfEJes8Q8nm/HDfssg=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
cargoHash = "sha256-n/UKM+/rXuf4vbc+1TGUTZzmRyYjLNMttmYnUs7HZPw=";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x scripts/*.bash
|
|
|
|
patchShebangs scripts/*.bash
|
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage httm.1
|
|
|
|
|
|
|
|
installShellCompletion --cmd httm \
|
|
|
|
--zsh scripts/httm-key-bindings.zsh
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
for script in scripts/*.bash; do
|
|
|
|
install -Dm755 "$script" "$out/bin/$(basename "$script" .bash)"
|
|
|
|
done
|
|
|
|
|
|
|
|
install -Dm644 README.md $out/share/doc/README.md
|
2022-04-27 09:35:20 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "Interactive, file-level Time Machine-like tool for ZFS/btrfs";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/kimono-koans/httm";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/kimono-koans/httm/releases/tag/${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ wyndon ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "httm";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|