From 4a1d17d5c38e18bbaec96475ed4db09001d4ac80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 23 Jun 2021 19:07:33 +0200 Subject: [PATCH 1/3] python3Packages.pygti: init at 0.9.2 --- .../python-modules/pygti/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/pygti/default.nix diff --git a/pkgs/development/python-modules/pygti/default.nix b/pkgs/development/python-modules/pygti/default.nix new file mode 100644 index 000000000000..62316b3d4dd5 --- /dev/null +++ b/pkgs/development/python-modules/pygti/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, setuptools-scm +, aiohttp +, pytz +, voluptuous +}: + +buildPythonPackage rec { + pname = "pygti"; + version = "0.9.2"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "vigonotion"; + repo = "pygti"; + rev = "v${version}"; + sha256 = "0zqa2krsniaqisjr0xqw009wdyy3y48zar9lrwysjsqci7k07d9x"; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + propagatedBuildInputs = [ + aiohttp + pytz + voluptuous + ]; + + # no tests implemented + doCheck = false; + + pythonImportsCheck = [ + "pygti.auth" + "pygti.exceptions" + "pygti.gti" + ]; + + meta = with lib; { + description = "Access public transport information in Hamburg, Germany"; + homepage = "https://github.com/vigonotion/pygti"; + license = licenses.asl20; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a61f1273190b..4e743e438b8e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5287,6 +5287,8 @@ in { pyflick = callPackage ../development/python-modules/pyflick { }; + pygti = callPackage ../development/python-modules/pygti { }; + pyheos = callPackage ../development/python-modules/pyheos { }; pyhiveapi = callPackage ../development/python-modules/pyhiveapi { }; From 628799e3f807cdf0937c9a6175233920e5c5b31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 23 Jun 2021 19:08:24 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages.nix --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 4d931d24847d..128d1d88df22 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -374,7 +374,7 @@ "huisbaasje" = ps: with ps; [ ]; # missing inputs: huisbaasje-client "humidifier" = ps: with ps; [ ]; "hunterdouglas_powerview" = ps: with ps; [ ]; # missing inputs: aiopvapi - "hvv_departures" = ps: with ps; [ ]; # missing inputs: pygti + "hvv_departures" = ps: with ps; [ pygti ]; "hydrawise" = ps: with ps; [ hydrawiser ]; "hyperion" = ps: with ps; [ hyperion-py ]; "ialarm" = ps: with ps; [ pyialarm ]; From 4cd0927ea69b09669a2b84764efe948753f8ba24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 23 Jun 2021 19:09:14 +0200 Subject: [PATCH 3/3] home-assistant: test hvv_departures component --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 3752e2c6d74c..27dab3077377 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -460,6 +460,7 @@ in with py.pkgs; buildPythonApplication rec { "huawei_lte" "hue" "humidifier" + "hvv_departures" "hyperion" "ialarm" "iaqualink"