blob: e3c2c235c596e266e99d587ee26660b2f60ba4e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
graphql-core,
pytest-asyncio,
pytest8_3CheckHook,
pythonAtLeast,
setuptools,
}:
buildPythonPackage rec {
pname = "apischema";
version = "0.18.3";
pyproject = true;
# Hasn't been updated in two years
disabled = pythonAtLeast "3.14";
src = fetchFromGitHub {
owner = "wyfo";
repo = "apischema";
tag = "v${version}";
hash = "sha256-YFJbNxCwDrJb603Bf8PDrvhVt4T53PNWOYs716c0f1I=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools==75.1.0" "setuptools" \
--replace-fail "wheel~=0.44.0" "wheel"
'';
build-system = [ setuptools ];
optional-dependencies = {
graphql = [ graphql-core ];
};
nativeCheckInputs = [
pytest-asyncio
pytest8_3CheckHook
]
++ lib.concatAttrValues optional-dependencies;
pythonImportsCheck = [ "apischema" ];
meta = {
description = "JSON (de)serialization, GraphQL and JSON schema generation using typing";
homepage = "https://github.com/wyfo/apischema";
changelog = "https://github.com/wyfo/apischema/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
|