From a14bf1a49e774b0fe2b6ccae344f1e390514dda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 2 Feb 2025 19:00:20 -0800 Subject: [PATCH] python313Packages.pyrail: init at 0.4.0 --- .../python-modules/pyrail/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/pyrail/default.nix diff --git a/pkgs/development/python-modules/pyrail/default.nix b/pkgs/development/python-modules/pyrail/default.nix new file mode 100644 index 000000000000..1d0003d29af2 --- /dev/null +++ b/pkgs/development/python-modules/pyrail/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d366c45cd051..b1c3426428ef 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10733,6 +10733,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 { };