depot/third_party/nixpkgs/pkgs/by-name/th/thud/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

48 lines
1.2 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "thud";
version = "0.3.1";
src = fetchFromGitHub {
owner = "donovanglover";
repo = "thud";
rev = version;
hash = "sha256-BmrJaZ1IKXjx4/QkBDZyXvTTaalfEOKsBp9ZCW8px7I=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-J7YioL8AIhoaPsYPzOXbwz76sMmBbDI/eql1HgDFgCU=";
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
install -Dm644 assets/thud.thumbnailer $out/share/thumbnailers/thud.thumbnailer
substituteInPlace $out/share/thumbnailers/thud.thumbnailer --replace "thud" "$out/bin/thud"
installManPage target/man/thud.1
installShellCompletion --cmd thud \
--bash <(cat target/completions/thud.bash) \
--fish <(cat target/completions/thud.fish) \
--zsh <(cat target/completions/_thud)
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Generate directory thumbnails for GTK-based file browsers from images inside them";
homepage = "https://github.com/donovanglover/thud";
license = licenses.mit;
maintainers = with maintainers; [ donovanglover ];
mainProgram = "thud";
};
}