Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / referencing / default.nix
blobdc09aa3594a4b9f695240fc6ef4d558f011ff3eb
1 { lib
2 , attrs
3 , buildPythonPackage
4 , fetchFromGitHub
5 , hatch-vcs
6 , hatchling
7 , jsonschema
8 , pytest-subtests
9 , pytestCheckHook
10 , pythonOlder
11 , rpds-py
15 let
16   self = buildPythonPackage rec {
17     pname = "referencing";
18     version = "0.30.2";
19     format = "pyproject";
21     disabled = pythonOlder "3.7";
23     src = fetchFromGitHub {
24       owner = "python-jsonschema";
25       repo = "referencing";
26       rev = "refs/tags/v${version}";
27       fetchSubmodules = true;
28       hash = "sha256-C2gKjoaMcUWz/QOsqpv4TkozQyI+zEIQf3GMf5w40aw=";
29     };
31     SETUPTOOLS_SCM_PRETEND_VERSION = version;
33     nativeBuildInputs = [
34       hatch-vcs
35       hatchling
36     ];
38     propagatedBuildInputs = [
39       attrs
40       rpds-py
41     ];
43     nativeCheckInputs = [
44       jsonschema
45       pytest-subtests
46       pytestCheckHook
47     ];
49     # avoid infinite recursion with jsonschema
50     doCheck = false;
52     passthru.tests.referencing = self.overridePythonAttrs { doCheck = true; };
54     pythonImportsCheck = [
55       "referencing"
56     ];
58     meta = with lib; {
59       description = "Cross-specification JSON referencing";
60       homepage = "https://github.com/python-jsonschema/referencing";
61       changelog = "https://github.com/python-jsonschema/referencing/blob/${version}/CHANGELOG.rst";
62       license = licenses.mit;
63       maintainers = with maintainers; [ fab ];
64     };
65   };
67   self