1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 ply,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "jsonpath-ng";
13 version = "1.7.0";
14 format = "setuptools";
15 # TODO: typo; change to pyproject = true;
16 pypropject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "h2non";
22 repo = "jsonpath-ng";
23 tag = "v${version}";
24 hash = "sha256-sfIqEc5SsNQYxK+Ur00fFdVoC0ysOkHrx4Cq/3SpGHw=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [ ply ];
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 pythonImportsCheck = [ "jsonpath_ng" ];
34
35 meta = with lib; {
36 description = "JSONPath implementation";
37 homepage = "https://github.com/h2non/jsonpath-ng";
38 changelog = "https://github.com/h2non/jsonpath-ng/blob/v${version}/History.md";
39 license = licenses.asl20;
40 maintainers = with maintainers; [ fab ];
41 mainProgram = "jsonpath_ng";
42 };
43}