home-assistant: support nmbs component (#379013)

This commit is contained in:
Martin Weinelt
2025-02-04 00:38:59 +01:00
committed by GitHub
3 changed files with 60 additions and 1 deletions
@@ -0,0 +1,56 @@
{
aiohttp,
buildPythonPackage,
fetchFromGitHub,
lib,
mashumaro,
poetry-core,
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pyrail";
version = "0.4.0";
pyproject = true;
src = fetchFromGitHub {
owner = "tjorim";
repo = "pyrail";
tag = "v${version}";
hash = "sha256-6CE8FrBCVcO88kGwqAMBx9dp5b27oeCm/w1PrEf6a0E=";
};
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 ];
};
}
@@ -3823,7 +3823,8 @@
];
"nmbs" =
ps: with ps; [
]; # missing inputs: pyrail
pyrail
];
"no_ip" =
ps: with ps; [
];
+2
View File
@@ -10747,6 +10747,8 @@ self: super: with self; {
pypoolstation = callPackage ../development/python-modules/pypoolstation { };
pyrail = callPackage ../development/python-modules/pyrail { };
pyrdfa3 = callPackage ../development/python-modules/pyrdfa3 { };
pyre-extensions = callPackage ../development/python-modules/pyre-extensions { };