1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, pytestCheckHook 5, js2py 6}: 7 8let pyjsparser = buildPythonPackage rec { 9 pname = "pyjsparser"; 10 version = "2.7.1"; 11 12 src = fetchFromGitHub { 13 owner = "PiotrDabkowski"; 14 repo = pname; 15 rev = "5465d037b30e334cb0997f2315ec1e451b8ad4c1"; 16 hash = "sha256-Hqay9/qsjUfe62U7Q79l0Yy01L2Bnj5xNs6427k3Br8="; 17 }; 18 19 nativeCheckInputs = [ pytestCheckHook js2py ]; 20 21 # escape infinite recursion with js2py 22 doCheck = false; 23 24 passthru.tests = { 25 check = pyjsparser.overridePythonAttrs (_: { doCheck = true; }); 26 }; 27 28 pythonImportsCheck = [ "pyjsparser" ]; 29 30 meta = with lib; { 31 description = "Fast javascript parser (based on esprima.js)"; 32 homepage = "https://github.com/PiotrDabkowski/pyjsparser"; 33 license = licenses.mit; 34 maintainers = with maintainers; [ onny ]; 35 }; 36}; in pyjsparser