summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/lark-parser/default.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
committerRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
commit4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch)
treee2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/lark-parser/default.nix
parentjq: fix build with structured-attrs on darwin (diff)
parentMerge pull request #123802 from superherointj/package-virtmanager-bugfix (diff)
downloadnixpkgs-origin/structured-attrs.tar.gz
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/lark-parser/default.nix')
-rw-r--r--pkgs/development/python-modules/lark-parser/default.nix27
1 files changed, 15 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/lark-parser/default.nix b/pkgs/development/python-modules/lark-parser/default.nix
index d8996a153e64..9f787563e5a4 100644
--- a/pkgs/development/python-modules/lark-parser/default.nix
+++ b/pkgs/development/python-modules/lark-parser/default.nix
@@ -1,35 +1,38 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
+, python
, regex
- # Test inputs
-, pytestCheckHook
}:
buildPythonPackage rec {
pname = "lark-parser";
- version = "0.11.2";
+ version = "0.11.3";
src = fetchFromGitHub {
owner = "lark-parser";
repo = "lark";
rev = version;
- sha256 = "1v1piaxpz4780km2z5i6sr9ygi9wpn09yyh999b3f4y0dcz20pbd";
+ sha256 = "1ggvlzpdzlrxl46fgi8cfq2rzlwn21shpdkm4pknnhfjlsinv913";
};
+ # Optional import, but fixes some re known bugs & allows advanced regex features
propagatedBuildInputs = [ regex ];
- checkInputs = [ pytestCheckHook ];
- disabledTestPaths = [
- "tests/test_nearley" # requires Js2Py package (not in nixpkgs)
- ];
- disabledTests = [
- "test_override_rule" # has issue with file access paths
- ];
+ checkPhase = ''
+ runHook preCheck
+
+ # Official way to run the tests. Runs unittest internally.
+ # pytest produces issues with some test resource paths (relies on __main__)
+ ${python.interpreter} -m tests
+
+ runHook postCheck
+ '';
meta = with lib; {
description = "A modern parsing library for Python, implementing Earley & LALR(1) and an easy interface";
- homepage = "https://github.com/lark-parser/lark";
+ homepage = "https://lark-parser.readthedocs.io/";
+ changelog = "https://github.com/lark-parser/lark/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ fridh drewrisinger ];
};