40 lines
963 B
Nix
40 lines
963 B
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
installShellFiles,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "tex-fmt";
|
|
version = "0.5.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "WGUNDERWOOD";
|
|
repo = "tex-fmt";
|
|
tag = "v${version}";
|
|
hash = "sha256-zF7Bbt4DrGb/PkKrHtynb6yskP+ZdIZY7BgLygZyvro=";
|
|
};
|
|
|
|
cargoHash = "sha256-Msvp1gEwVoUb7DhBdPtjT/d+/I+G8pv+sBWxqqqdyEQ=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
installManPage man/tex-fmt.1
|
|
installShellCompletion \
|
|
--bash completion/tex-fmt.bash \
|
|
--fish completion/tex-fmt.fish \
|
|
--zsh completion/_tex-fmt
|
|
'';
|
|
|
|
meta = {
|
|
description = "LaTeX formatter written in Rust";
|
|
homepage = "https://github.com/WGUNDERWOOD/tex-fmt";
|
|
changelog = "https://github.com/WGUNDERWOOD/tex-fmt/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "tex-fmt";
|
|
maintainers = with lib.maintainers; [ wgunderwood ];
|
|
};
|
|
}
|