blob: 3158b626c2a63733a35bcbe10a3220be2c28d775 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, regex
, pytestCheckHook
, js2py
, setuptools
}:
buildPythonPackage rec {
pname = "lark";
version = "1.1.7";
format = "pyproject";
src = fetchFromGitHub {
owner = "lark-parser";
repo = "lark";
rev = "refs/tags/${version}";
hash = "sha256-k74tozIgJuwtUqKKmYHlfLpCWyT2hdoygRJiIpw+GDE=";
};
patches = [
# include .lark files in package data
# https://github.com/lark-parser/lark/pull/1308
(fetchpatch {
url = "https://github.com/lark-parser/lark/commit/656334cb8793fd4e08a12843eaced5a7bb518be3.patch";
hash = "sha256-pYeNnFfXJ8xkR0KsU/KMWJ8nF+BhP9PXEANiVhT254s=";
})
];
nativeBuildInputs = [
setuptools
];
# Optional import, but fixes some re known bugs & allows advanced regex features
propagatedBuildInputs = [ regex ];
pythonImportsCheck = [
"lark"
"lark.parsers"
"lark.tools"
"lark.grammars"
];
nativeCheckInputs = [
js2py
pytestCheckHook
];
meta = with lib; {
description = "A modern parsing library for Python, implementing Earley & LALR(1) and an easy interface";
homepage = "https://lark-parser.readthedocs.io/";
changelog = "https://github.com/lark-parser/lark/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ fridh drewrisinger ];
};
}
|