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