1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 regex,
6 setuptools,
7}:
8
9buildPythonPackage rec {
10 pname = "lark";
11 version = "1.2.2";
12 format = "pyproject";
13
14 src = fetchFromGitHub {
15 owner = "lark-parser";
16 repo = "lark";
17 tag = version;
18 hash = "sha256-02NX/2bHTYSVTDLLudJmEU2DcQNn0Ke+5ayilKLlwqA=";
19 };
20
21 nativeBuildInputs = [ setuptools ];
22
23 # Optional import, but fixes some re known bugs & allows advanced regex features
24 propagatedBuildInputs = [ regex ];
25
26 pythonImportsCheck = [
27 "lark"
28 "lark.parsers"
29 "lark.tools"
30 "lark.grammars"
31 ];
32
33 # Js2py is needed for tests but it's unmaintained and insecure
34 doCheck = false;
35
36 meta = with lib; {
37 description = "Modern parsing library for Python, implementing Earley & LALR(1) and an easy interface";
38 homepage = "https://lark-parser.readthedocs.io/";
39 changelog = "https://github.com/lark-parser/lark/releases/tag/${version}";
40 license = licenses.mit;
41 maintainers = with maintainers; [ drewrisinger ];
42 };
43}