1{ 2 lib, 3 black, 4 buildPythonPackage, 5 cachecontrol, 6 fetchFromGitHub, 7 importlib-resources, 8 mistune, 9 mypy, 10 mypy-extensions, 11 pytestCheckHook, 12 pythonRelaxDepsHook, 13 pythonOlder, 14 rdflib, 15 requests, 16 ruamel-yaml, 17 setuptools-scm, 18 types-dataclasses, 19 types-requests, 20 types-setuptools, 21}: 22 23buildPythonPackage rec { 24 pname = "schema-salad"; 25 version = "8.5.20240410123758"; 26 pyproject = true; 27 28 disabled = pythonOlder "3.8"; 29 30 src = fetchFromGitHub { 31 owner = "common-workflow-language"; 32 repo = "schema_salad"; 33 rev = "refs/tags/${version}"; 34 hash = "sha256-AgXqeiA4sP7KBnUpb2uMWq45G0LhJ5uLtORrOG4UuB0="; 35 }; 36 37 postPatch = '' 38 substituteInPlace pyproject.toml \ 39 --replace-fail "black>=19.10b0,<23.12" "black>=19.10b0" 40 ''; 41 42 build-system = [ setuptools-scm ]; 43 44 dependencies = 45 [ 46 cachecontrol 47 mistune 48 mypy 49 mypy-extensions 50 rdflib 51 requests 52 ruamel-yaml 53 types-dataclasses 54 types-requests 55 types-setuptools 56 ] 57 ++ cachecontrol.optional-dependencies.filecache 58 ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ]; 59 60 nativeCheckInputs = [ pytestCheckHook ] ++ passthru.optional-dependencies.pycodegen; 61 62 preCheck = '' 63 rm tox.ini 64 ''; 65 66 disabledTests = [ 67 "test_load_by_yaml_metaschema" 68 # Setup for these tests requires network access 69 "test_secondaryFiles" 70 "test_outputBinding" 71 # Test requires network 72 "test_yaml_tab_error" 73 "test_bad_schemas" 74 ]; 75 76 pythonImportsCheck = [ "schema_salad" ]; 77 78 passthru.optional-dependencies = { 79 pycodegen = [ black ]; 80 }; 81 82 meta = with lib; { 83 description = "Semantic Annotations for Linked Avro Data"; 84 homepage = "https://github.com/common-workflow-language/schema_salad"; 85 changelog = "https://github.com/common-workflow-language/schema_salad/releases/tag/${version}"; 86 license = with licenses; [ asl20 ]; 87 maintainers = with maintainers; [ veprbl ]; 88 }; 89}