1{
2 lib,
3 attrs,
4 buildPythonPackage,
5 fetchFromGitHub,
6 hatch-vcs,
7 hatchling,
8 jsonschema,
9 pytest-subtests,
10 pytestCheckHook,
11 pythonOlder,
12 rpds-py,
13}:
14
15let
16 self = buildPythonPackage rec {
17 pname = "referencing";
18 version = "0.34.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "python-jsonschema";
25 repo = "referencing";
26 rev = "refs/tags/v${version}";
27 fetchSubmodules = true;
28 hash = "sha256-Vx+WVgt09I04Z/sIYsLLtPCwuo5wW0Z2o2OTH2V17UY=";
29 };
30
31 build-system = [
32 hatch-vcs
33 hatchling
34 ];
35
36 dependencies = [
37 attrs
38 rpds-py
39 ];
40
41 nativeCheckInputs = [
42 jsonschema
43 pytest-subtests
44 pytestCheckHook
45 ];
46
47 # Avoid infinite recursion with jsonschema
48 doCheck = false;
49
50 passthru.tests.referencing = self.overridePythonAttrs { doCheck = true; };
51
52 pythonImportsCheck = [ "referencing" ];
53
54 meta = with lib; {
55 description = "Cross-specification JSON referencing";
56 homepage = "https://github.com/python-jsonschema/referencing";
57 changelog = "https://github.com/python-jsonschema/referencing/releases/tag/v${version}";
58 license = licenses.mit;
59 maintainers = with maintainers; [ fab ];
60 };
61 };
62in
63self