2022-12-17 10:02:37 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "topiary";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "unstable-2023-01-10";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tweag";
|
|
|
|
repo = pname;
|
2023-01-11 07:51:40 +00:00
|
|
|
rev = "c36d4a2253f337e1a28d497826a84754b8d833f6";
|
|
|
|
sha256 = "sha256-0uqDuEpL9JCXzD7sQ3PDv4N1KtCSkoMoD5i402uIfas=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
cargoSha256 = "sha256-PvMjLC133rlsPrgyESuVHIf2TPCtgGQQULCQvBTIJ20=";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 languages/* -t $out/share/languages
|
|
|
|
'';
|
|
|
|
|
|
|
|
TOPIARY_LANGUAGE_DIR = "${placeholder "out"}/share/languages";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A uniform formatter for simple languages, as part of the Tree-sitter ecosystem";
|
|
|
|
homepage = "https://github.com/tweag/topiary";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|