2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
2022-12-28 21:21:41 +00:00
|
|
|
, fetchFromGitHub
|
2022-06-16 17:23:12 +00:00
|
|
|
, installShellFiles
|
|
|
|
}:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "httm";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.38.1";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kimono-koans";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-aCWhjMXLNx5/wV1HFDtyUuUfpRAxDZhI/Bk7roqZkJ8=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
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
|
|
|
};
|
|
|
|
}
|