From a152e583c88c675c3c1c53c50fbcd79e177d7310 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 26 Jan 2024 13:45:24 +0100 Subject: [PATCH 1/2] python311Packages.vtjp: init at 0.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A Python wrapper and cli for Västtrafik public API https://github.com/Miicroo/python-vasttrafik --- .../python-modules/vtjp/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/vtjp/default.nix diff --git a/pkgs/development/python-modules/vtjp/default.nix b/pkgs/development/python-modules/vtjp/default.nix new file mode 100644 index 000000000000..4e193ea2eb48 --- /dev/null +++ b/pkgs/development/python-modules/vtjp/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, requests +, setuptools +, tabulate +}: + +buildPythonPackage rec { + pname = "vtjp"; + version = "0.2.1"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Miicroo"; + repo = "python-vasttrafik"; + rev = "refs/tags/v${version}"; + hash = "sha256-3/toHY2PkG87J5bIMNJZHF/4mUvWaeHamMzPa1St7Xo="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + requests + tabulate + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ + "vasttrafik" + ]; + + meta = with lib; { + description = "A Python wrapper and cli for Västtrafik public API"; + homepage = "https://github.com/Miicroo/python-vasttrafik"; + changelog = "https://github.com/Miicroo/python-vasttrafik/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ba9705c80c1f..064676394ea4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15962,6 +15962,8 @@ self: super: with self; { vt-py = callPackage ../development/python-modules/vt-py { }; + vtjp = callPackage ../development/python-modules/vtjp { }; + vtk = toPythonModule (pkgs.vtk_9.override { inherit python; enablePython = true; From 29968ee5eec13ea77dd2a9ee8454f825a5028a35 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 26 Jan 2024 13:48:03 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 26e4dc094950..7bd731296827 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -5256,7 +5256,8 @@ "valve" = ps: with ps; [ ]; "vasttrafik" = ps: with ps; [ - ]; # missing inputs: vtjp + vtjp + ]; "velbus" = ps: with ps; [ aiohttp-cors aiohttp-fast-url-dispatcher