nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, python
5, regex
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "lark";
11 version = "1.1.2";
12
13 src = fetchFromGitHub {
14 owner = "lark-parser";
15 repo = "lark";
16 rev = version;
17 sha256 = "sha256-Y1bDSiFnqAKTlIcd8aAgtc+I3TLnWF8hhQK2ez96TQs=";
18 };
19
20 # Optional import, but fixes some re known bugs & allows advanced regex features
21 propagatedBuildInputs = [ regex ];
22
23 pythonImportsCheck = [
24 "lark"
25 "lark.parsers"
26 "lark.tools"
27 "lark.grammars"
28 ];
29
30 checkInputs = [ pytestCheckHook ];
31
32 disabledTestPaths = [
33 "tests/test_nearley/test_nearley.py" # requires unpackaged Js2Py library
34 ];
35
36 meta = with lib; {
37 description = "A 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; [ fridh drewrisinger ];
42 };
43}