1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pytestCheckHook, 7 pythonOlder, 8 setuptools, 9}: 10 11buildPythonPackage rec { 12 pname = "fastjsonschema"; 13 version = "2.21.1"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "horejsek"; 20 repo = "python-fastjsonschema"; 21 rev = "v${version}"; 22 fetchSubmodules = true; 23 hash = "sha256-H/jmvm5U4RB9KuD5EgCedbc499Fl8L2S9Y5SXy51JP0="; 24 }; 25 26 build-system = [ setuptools ]; 27 28 nativeCheckInputs = [ pytestCheckHook ]; 29 30 disabledTests = [ 31 "benchmark" 32 # these tests require network access 33 "remote ref" 34 "definitions" 35 ] 36 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 37 "test_compile_to_code_custom_format" # cannot import temporary module created during test 38 ]; 39 40 disabledTestPaths = [ 41 # fastjsonschema.exceptions.JsonSchemaDefinitionException: Unknown format uuid/duration 42 "tests/json_schema/test_draft2019.py::test" 43 ]; 44 45 pythonImportsCheck = [ "fastjsonschema" ]; 46 47 meta = with lib; { 48 description = "JSON schema validator for Python"; 49 downloadPage = "https://github.com/horejsek/python-fastjsonschema"; 50 homepage = "https://horejsek.github.io/python-fastjsonschema/"; 51 license = licenses.bsd3; 52 maintainers = with maintainers; [ drewrisinger ]; 53 }; 54}