e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
48 lines
1 KiB
Nix
48 lines
1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, regex
|
|
, pytestCheckHook
|
|
, js2py
|
|
, setuptools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "lark";
|
|
version = "1.1.8";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lark-parser";
|
|
repo = "lark";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-bGNoQeiAC2JIFOhgYUnc+nApa2ovFzXnpl9JQAE11hM=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|