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