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