1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 pythonRelaxDepsHook,
7
8 # build
9 poetry-core,
10
11 # propagates
12 pathable,
13 pyyaml,
14 referencing,
15 requests,
16
17 # tests
18 pytestCheckHook,
19 responses,
20}:
21
22buildPythonPackage rec {
23 pname = "jsonschema-spec";
24 version = "0.2.4";
25 format = "pyproject";
26
27 disabled = pythonOlder "3.8";
28
29 src = fetchFromGitHub {
30 owner = "p1c2u";
31 repo = pname;
32 rev = "refs/tags/${version}";
33 hash = "sha256-1Flb3XQCGhrAYzTvriSVhHDb/Z/uvCyZdbav2u7f3sg=";
34 };
35
36 postPatch = ''
37 sed -i "/^--cov/d" pyproject.toml
38
39 substituteInPlace pyproject.toml \
40 --replace 'referencing = ">=0.28.0,<0.30.0"' 'referencing = ">=0.28.0"'
41 '';
42
43 nativeBuildInputs = [
44 poetry-core
45 pythonRelaxDepsHook
46 ];
47
48 pythonRelaxDeps = [ "referencing" ];
49
50 propagatedBuildInputs = [
51 pathable
52 pyyaml
53 referencing
54 requests
55 ];
56
57 nativeCheckInputs = [
58 pytestCheckHook
59 responses
60 ];
61
62 passthru.skipBulkUpdate = true; # newer versions under the jsonschema-path name
63
64 meta = with lib; {
65 changelog = "https://github.com/p1c2u/jsonschema-spec/releases/tag/${version}";
66 description = "JSONSchema Spec with object-oriented paths";
67 homepage = "https://github.com/p1c2u/jsonschema-spec";
68 license = licenses.asl20;
69 maintainers = with maintainers; [ hexa ];
70 };
71}