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 responses,
19}:
20
21buildPythonPackage rec {
22 pname = "jsonschema-spec";
23 version = "0.3.4";
24 format = "pyproject";
25
26 disabled = pythonOlder "3.8";
27
28 src = fetchFromGitHub {
29 owner = "p1c2u";
30 repo = pname;
31 tag = version;
32 hash = "sha256-rCepDnVAOEsokKjWCuqDYbGIq6/wn4rsQRx5dXTUsYo=";
33 };
34
35 postPatch = ''
36 sed -i "/^--cov/d" pyproject.toml
37
38 substituteInPlace pyproject.toml \
39 --replace 'referencing = ">=0.28.0,<0.30.0"' 'referencing = ">=0.28.0"'
40 '';
41
42 nativeBuildInputs = [
43 poetry-core
44 ];
45
46 pythonRelaxDeps = [ "referencing" ];
47
48 propagatedBuildInputs = [
49 pathable
50 pyyaml
51 referencing
52 requests
53 ];
54
55 nativeCheckInputs = [
56 pytestCheckHook
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}