2022-12-17 10:02:37 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "topiary";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.1.0";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tweag";
|
|
|
|
repo = pname;
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-Gm6AzzVLUXZi2jzJ1b/c4yjIvRRA2e5mC2CMVyly2X8=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
cargoSha256 = "sha256-2Ovwntg3aZyR73rg8ruA/U1wVS1BO+B7r37D6/LPa/g=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|