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