blob: 6069db6db723466de232189f13063f3d5fcf5cca (
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
55
56
57
|
{
aiohttp,
buildPythonPackage,
fetchFromGitHub,
lib,
mashumaro,
poetry-core,
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pyrail";
version = "0.4.1";
pyproject = true;
src = fetchFromGitHub {
owner = "tjorim";
repo = "pyrail";
tag = "v${version}";
hash = "sha256-MFsFtspL9cmhwu2oo8wx0Sjx2VpQe92JP9e0M7U8CL8=";
};
build-system = [ poetry-core ];
dependencies = [
aiohttp
mashumaro
]
++ mashumaro.optional-dependencies.orjson;
pythonImportsCheck = [ "pyrail" ];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
disabledTests = [
# tests connect to the internet
"test_get_composition"
"test_get_connections"
"test_get_disturbances"
"test_get_liveboard"
"test_get_stations"
"test_get_vehicle"
"test_liveboard_with_date_time"
];
meta = {
changelog = "https://github.com/tjorim/pyrail/releases/tag/${src.tag}";
description = "Async Python wrapper for the iRail API";
homepage = "https://github.com/tjorim/pyrail";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ dotlambda ];
};
}
|