2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
black,
|
|
|
|
buildPythonPackage,
|
|
|
|
cachecontrol,
|
|
|
|
fetchFromGitHub,
|
2024-07-31 10:19:44 +00:00
|
|
|
fetchpatch,
|
2024-04-21 15:54:59 +00:00
|
|
|
importlib-resources,
|
|
|
|
mistune,
|
|
|
|
mypy,
|
|
|
|
mypy-extensions,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
rdflib,
|
|
|
|
requests,
|
|
|
|
ruamel-yaml,
|
|
|
|
setuptools-scm,
|
|
|
|
types-dataclasses,
|
|
|
|
types-requests,
|
|
|
|
types-setuptools,
|
2021-08-08 23:34:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "schema-salad";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "8.5.20240503091721";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-08-08 23:34:03 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "common-workflow-language";
|
|
|
|
repo = "schema_salad";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-VbEIkWzg6kPnJWqbvlfsD83oS0VQasGQo+pUIPiGjhU=";
|
2021-08-08 23:34:03 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "black>=19.10b0,<23.12" "black>=19.10b0"
|
|
|
|
'';
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools-scm ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies =
|
|
|
|
[
|
|
|
|
cachecontrol
|
|
|
|
mistune
|
|
|
|
mypy
|
|
|
|
mypy-extensions
|
|
|
|
rdflib
|
|
|
|
requests
|
|
|
|
ruamel-yaml
|
|
|
|
types-dataclasses
|
|
|
|
types-requests
|
|
|
|
types-setuptools
|
|
|
|
]
|
|
|
|
++ cachecontrol.optional-dependencies.filecache
|
|
|
|
++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
patches = [ (fetchpatch {
|
|
|
|
url = "https://patch-diff.githubusercontent.com/raw/common-workflow-language/schema_salad/pull/840.patch";
|
|
|
|
hash = "sha256-fke75FCCn23LAMJ5bDWJpuBR6E9XIpjmzzXSbjqpxn8=";
|
|
|
|
} ) ];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ] ++ passthru.optional-dependencies.pycodegen;
|
2021-08-08 23:34:03 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
preCheck = ''
|
|
|
|
rm tox.ini
|
|
|
|
'';
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
disabledTests = [
|
2024-01-25 14:12:00 +00:00
|
|
|
"test_load_by_yaml_metaschema"
|
2022-04-27 09:35:20 +00:00
|
|
|
# Setup for these tests requires network access
|
2021-08-08 23:34:03 +00:00
|
|
|
"test_secondaryFiles"
|
|
|
|
"test_outputBinding"
|
2022-04-27 09:35:20 +00:00
|
|
|
# Test requires network
|
|
|
|
"test_yaml_tab_error"
|
2023-03-24 00:07:29 +00:00
|
|
|
"test_bad_schemas"
|
2021-08-08 23:34:03 +00:00
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "schema_salad" ];
|
2021-08-08 23:34:03 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-04-21 15:54:59 +00:00
|
|
|
pycodegen = [ black ];
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Semantic Annotations for Linked Avro Data";
|
|
|
|
homepage = "https://github.com/common-workflow-language/schema_salad";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/common-workflow-language/schema_salad/releases/tag/${version}";
|
2021-08-08 23:34:03 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|