Merge pull request #233434 from figsoda/topiary

topiary: 0.1.0 -> 0.2.0
This commit is contained in:
Ilan Joselevich 2023-05-22 22:06:10 +03:00 committed by GitHub
commit bf0e44973f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 864 additions and 185 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,35 +1,56 @@
{ lib, rustPlatform, fetchFromGitHub }:
{ lib
, rustPlatform
, fetchFromGitHub
, fetchpatch
}:
rustPlatform.buildRustPackage rec {
pname = "topiary";
version = "0.1.0";
version = "0.2.0";
src = fetchFromGitHub {
owner = "tweag";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Gm6AzzVLUXZi2jzJ1b/c4yjIvRRA2e5mC2CMVyly2X8=";
hash = "sha256-OJdR+8eGbcDjirupjcczztYbGKGKaRywZnqqjv0EOSU=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"tree-sitter-bash-0.19.0" = "sha256-5gBH0tBnNevAdBwlsLQAI9JOyz2lDY7Gb54HVCD4+Zs=";
"tree-sitter-nickel-0.0.1" = "sha256-D/RRwXsWyHMxoU7Z8VVJ6jn7zUFKaKusLT/ofON7sOE=";
"tree-sitter-bash-0.19.0" = "sha256-Po2r+wUWJwC+ODk/xotYI7PsmjC3TFSu1dU0FrrnAXQ=";
"tree-sitter-facade-0.9.3" = "sha256-M/npshnHJkU70pP3I4WMXp3onlCSWM5mMIqXP45zcUs=";
"tree-sitter-nickel-0.0.1" = "sha256-NLgbTl1Te/lHTGra4DdxLtqIg6yXf5lfyl37qpp8SNQ=";
"tree-sitter-ocaml-0.20.1" = "sha256-5X2c2Deb8xNlp0LPQKFWIT3jwxKuuKdFlp9b3iA818Y=";
"tree-sitter-query-0.0.1" = "sha256-dWWof8rYFTto3A4BfbKTKcNieRbwFdF6xDXW9tQvAqQ=";
"tree-sitter-query-0.1.0" = "sha256-Gv882sbL2fmR++h4/I7dFCp+g6pddRCaLyX7+loEoHU=";
"web-tree-sitter-sys-1.3.0" = "sha256-9rKB0rt0y9TD/HLRoB9LjEP9nO4kSWR9ylbbOXo2+2M=";
};
};
patches = [
# the versions in `Cargo.toml`s are outdated
(fetchpatch {
name = "bump-version-to-0.2.0.patch";
url = "https://github.com/tweag/topiary/commit/612fdb64f50ab15889a0b508bf727f159f26a112.patch";
hash = "sha256-MHaAnYyjXdKbh/pE3bL2iAPX6bMQkK+LUGYCL5mBM44=";
})
];
cargoBuildFlags = [ "-p" "topiary-cli" ];
cargoTestFlags = cargoBuildFlags;
env = {
TOPIARY_LANGUAGE_DIR = "${placeholder "out"}/share/languages";
};
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";
changelog = "https://github.com/tweag/topiary/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
};