1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cargo, 6 rustPlatform, 7 rustc, 8 setuptools, 9}: 10 11buildPythonPackage rec { 12 pname = "tree-sitter-make"; 13 version = "1.1.1"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "tree-sitter-grammars"; 18 repo = "tree-sitter-make"; 19 rev = "v${version}"; 20 hash = "sha256-WiuhAp9JZKLd0wKCui9MV7AYFOW9dCbUp+kkVl1OEz0="; 21 }; 22 23 cargoDeps = rustPlatform.fetchCargoVendor { 24 inherit src; 25 name = "${pname}-${version}"; 26 hash = "sha256-75jtur5rmG4zpNXSE3OpPVR+/lf4SICsh+kgzIKfbd4="; 27 }; 28 29 build-system = [ 30 cargo 31 rustPlatform.cargoSetupHook 32 rustc 33 setuptools 34 ]; 35 36 # There are no tests 37 doCheck = false; 38 pythonImportsCheck = [ 39 "tree_sitter_make" 40 ]; 41 42 meta = { 43 description = "Makefile grammar for tree-sitter"; 44 homepage = "https://github.com/tree-sitter-grammars/tree-sitter-make"; 45 license = lib.licenses.mit; 46 maintainers = with lib.maintainers; [ doronbehar ]; 47 }; 48}