57 lines
1.0 KiB
Nix
57 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildPythonPackage,
|
|
rustPlatform,
|
|
cargo,
|
|
rustc,
|
|
setuptools,
|
|
tree-sitter,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "tree-sitter-c-sharp";
|
|
version = "0.23.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tree-sitter";
|
|
repo = "tree-sitter-c-sharp";
|
|
tag = "v${version}";
|
|
hash = "sha256-weH0nyLpvVK/OpgvOjTuJdH2Hm4a1wVshHmhUdFq3XA=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit src;
|
|
hash = "sha256-IogdMRj1eHRLtdNFdGNInpEQAAbRpM248GqkY+Mgu10=";
|
|
};
|
|
|
|
build-system = [
|
|
cargo
|
|
rustPlatform.cargoSetupHook
|
|
rustc
|
|
setuptools
|
|
];
|
|
|
|
optional-dependencies = {
|
|
core = [
|
|
tree-sitter
|
|
];
|
|
};
|
|
|
|
pythonImportsCheck = [ "tree_sitter_c_sharp" ];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
tree-sitter
|
|
];
|
|
|
|
meta = {
|
|
description = "C# Grammar for tree-sitter";
|
|
homepage = "https://github.com/tree-sitter/tree-sitter-c-sharp";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ yzx9 ];
|
|
};
|
|
}
|