nixpkgs/pkgs/development/python-modules/pyjsparser/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

37 lines
860 B
Nix

{ lib
, fetchFromGitHub
, buildPythonPackage
, pytestCheckHook
, js2py
}:
let pyjsparser = buildPythonPackage rec {
pname = "pyjsparser";
version = "2.7.1";
src = fetchFromGitHub {
owner = "PiotrDabkowski";
repo = pname;
rev = "5465d037b30e334cb0997f2315ec1e451b8ad4c1";
sha256 = "sha256-Hqay9/qsjUfe62U7Q79l0Yy01L2Bnj5xNs6427k3Br8=";
};
nativeCheckInputs = [ pytestCheckHook js2py ];
# escape infinite recursion with js2py
doCheck = false;
passthru.tests = {
check = pyjsparser.overridePythonAttrs (_: { doCheck = true; });
};
pythonImportsCheck = [ "pyjsparser" ];
meta = with lib; {
description = "Fast javascript parser (based on esprima.js)";
homepage = "https://github.com/PiotrDabkowski/pyjsparser";
license = licenses.mit;
maintainers = with maintainers; [ onny ];
};
}; in pyjsparser