1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5
6# build-system
7, poetry-core
8
9# propagates
10, jsonschema
11, jsonschema-specifications
12, rfc3339-validator
13
14# tests
15, pytestCheckHook
16}:
17
18buildPythonPackage rec {
19 pname = "openapi-schema-validator";
20 version = "0.6.0";
21 format = "pyproject";
22
23 disabled = pythonOlder "3.8";
24
25 src = fetchFromGitHub {
26 owner = "p1c2u";
27 repo = pname;
28 rev = "refs/tags/${version}";
29 hash = "sha256-859v6KqIRfUq4d/KbkvGnGqlxz6BXTl+tKQHPhtkTH0=";
30 };
31
32 postPatch = ''
33 sed -i "/--cov/d" pyproject.toml
34 '';
35
36 nativeBuildInputs = [
37 poetry-core
38 ];
39
40 propagatedBuildInputs = [
41 jsonschema
42 jsonschema-specifications
43 rfc3339-validator
44 ];
45
46 nativeCheckInputs = [
47 pytestCheckHook
48 ];
49
50 pythonImportsCheck = [ "openapi_schema_validator" ];
51
52 meta = with lib; {
53 changelog = "https://github.com/python-openapi/openapi-schema-validator/releases/tag/${version}";
54 description = "Validates OpenAPI schema against the OpenAPI Schema Specification v3.0";
55 homepage = "https://github.com/p1c2u/openapi-schema-validator";
56 license = licenses.bsd3;
57 maintainers = with maintainers; [ AluisioASG ];
58 };
59}