nixpkgs/pkgs/by-name/ht/httm/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.1 KiB
Nix
Raw Normal View History

2024-07-23 20:55:00 +01:00
{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
2022-05-29 22:35:32 +01:00
}:
2022-04-21 22:23:06 +01:00
rustPlatform.buildRustPackage rec {
pname = "httm";
2024-08-16 00:03:34 +01:00
version = "0.42.0";
2022-04-21 22:23:06 +01:00
src = fetchFromGitHub {
owner = "kimono-koans";
repo = pname;
rev = version;
2024-08-16 00:03:34 +01:00
hash = "sha256-2NvTo+EDw7GcDbND7epHWnHehcVBo11QyuZ0PoJf7Nc=";
2022-04-21 22:23:06 +01:00
};
2024-08-16 00:03:34 +01:00
cargoHash = "sha256-YSpYg10IeuqUAmjIQzrA59IT7r86/q8DtEKnazjo9rQ=";
2022-04-21 22:23:06 +01:00
nativeBuildInputs = [ installShellFiles ];
2023-11-15 10:57:09 +00:00
postPatch = ''
chmod +x scripts/*.bash
patchShebangs scripts/*.bash
'';
2022-04-21 22:23:06 +01:00
postInstall = ''
installManPage httm.1
installShellCompletion --cmd httm \
--zsh scripts/httm-key-bindings.zsh
2023-11-15 10:57:09 +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-21 22:23:06 +01:00
'';
meta = with lib; {
2022-06-06 23:07:10 +01:00
description = "Interactive, file-level Time Machine-like tool for ZFS/btrfs";
2022-04-21 22:23:06 +01:00
homepage = "https://github.com/kimono-koans/httm";
changelog = "https://github.com/kimono-koans/httm/releases/tag/${version}";
2022-04-21 22:23:06 +01:00
license = licenses.mpl20;
maintainers = with maintainers; [ wyndon ];
2023-11-23 21:09:35 +00:00
mainProgram = "httm";
2022-04-21 22:23:06 +01:00
};
}