summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyjsparser/default.nix
blob: b0988585e21bccf52caee2166255bb9a902c02da (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  lib,
  fetchFromGitHub,
  buildPythonPackage,
  pytestCheckHook,
}:

let
  pyjsparser = buildPythonPackage rec {
    pname = "pyjsparser";
    version = "2.7.1";
    format = "setuptools";

    src = fetchFromGitHub {
      owner = "PiotrDabkowski";
      repo = pname;
      rev = "5465d037b30e334cb0997f2315ec1e451b8ad4c1";
      hash = "sha256-Hqay9/qsjUfe62U7Q79l0Yy01L2Bnj5xNs6427k3Br8=";
    };

    nativeCheckInputs = [
      pytestCheckHook
    ];

    # js2py is needed for tests but it's unmaintained and insecure
    doCheck = false;

    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