at master 1.2 kB view raw
1{ 2 aiohttp, 3 buildPythonPackage, 4 fetchFromGitHub, 5 lib, 6 mashumaro, 7 poetry-core, 8 pytest-asyncio, 9 pytestCheckHook, 10}: 11 12buildPythonPackage rec { 13 pname = "pyrail"; 14 version = "0.4.1"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "tjorim"; 19 repo = "pyrail"; 20 tag = "v${version}"; 21 hash = "sha256-MFsFtspL9cmhwu2oo8wx0Sjx2VpQe92JP9e0M7U8CL8="; 22 }; 23 24 build-system = [ poetry-core ]; 25 26 dependencies = [ 27 aiohttp 28 mashumaro 29 ] 30 ++ mashumaro.optional-dependencies.orjson; 31 32 pythonImportsCheck = [ "pyrail" ]; 33 34 nativeCheckInputs = [ 35 pytest-asyncio 36 pytestCheckHook 37 ]; 38 39 disabledTests = [ 40 # tests connect to the internet 41 "test_get_composition" 42 "test_get_connections" 43 "test_get_disturbances" 44 "test_get_liveboard" 45 "test_get_stations" 46 "test_get_vehicle" 47 "test_liveboard_with_date_time" 48 ]; 49 50 meta = { 51 changelog = "https://github.com/tjorim/pyrail/releases/tag/${src.tag}"; 52 description = "Async Python wrapper for the iRail API"; 53 homepage = "https://github.com/tjorim/pyrail"; 54 license = lib.licenses.asl20; 55 maintainers = with lib.maintainers; [ dotlambda ]; 56 }; 57}