depot/third_party/nixpkgs/pkgs/development/python-modules/lark/default.nix
Default email 8e65f7f0cc Project import generated by Copybara.
GitOrigin-RevId: 062a0c5437b68f950b081bbfc8a699d57a4ee026
2022-03-05 17:20:37 +01:00

43 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, regex
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "lark";
version = "1.1.2";
src = fetchFromGitHub {
owner = "lark-parser";
repo = "lark";
rev = version;
sha256 = "sha256-Y1bDSiFnqAKTlIcd8aAgtc+I3TLnWF8hhQK2ez96TQs=";
};
# Optional import, but fixes some re known bugs & allows advanced regex features
propagatedBuildInputs = [ regex ];
pythonImportsCheck = [
"lark"
"lark.parsers"
"lark.tools"
"lark.grammars"
];
checkInputs = [ pytestCheckHook ];
disabledTestPaths = [
"tests/test_nearley/test_nearley.py" # requires unpackaged Js2Py library
];
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 ];
};
}