depot/third_party/nixpkgs/pkgs/development/python-modules/tree-sitter-rust/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

40 lines
781 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, tree-sitter
}:
buildPythonPackage rec {
pname = "tree-sitter-rust";
version = "0.21.2";
pyproject = true;
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-rust";
rev = "v${version}";
hash = "sha256-4CTh6fKSV8TuMHLAfEKWsAeCqeCM2uo6hVmF5KWhyPY=";
};
build-system = [
setuptools
];
optional-dependencies = {
core = [
tree-sitter
];
};
# There are no tests
doCheck = false;
pythonImportsCheck = [ "tree_sitter_rust" ];
meta = with lib; {
description = "Rust grammar for tree-sitter";
homepage = "https://github.com/tree-sitter/tree-sitter-rust";
license = licenses.mit;
maintainers = with maintainers; [ doronbehar ];
};
}