From 4d2f44992c508a38e781abea0b02ad9395d7da9f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 13 Feb 2021 15:16:35 +0100 Subject: [PATCH 1/3] python3Packages.metar: init at 1.8.0 --- .../python-modules/metar/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 +++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/metar/default.nix diff --git a/pkgs/development/python-modules/metar/default.nix b/pkgs/development/python-modules/metar/default.nix new file mode 100644 index 00000000000..e832c7cf56f --- /dev/null +++ b/pkgs/development/python-modules/metar/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "metar"; + version = "1.8.0"; + + src = fetchFromGitHub { + owner = "python-metar"; + repo = "python-metar"; + rev = "v${version}"; + sha256 = "019vfq9191cdvvq1afdcdgdgbzpj7wq6pz9li8ggim71azjnv5nn"; + }; + + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "metar" ]; + + meta = with lib; { + description = "Python parser for coded METAR weather reports"; + homepage = "https://github.com/python-metar/python-metar"; + license = with licenses; [ bsd1 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 17f6624c42e..fd5ad52e58e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -542,6 +542,8 @@ in { augeas = callPackage ../development/python-modules/augeas { inherit (pkgs) augeas; }; + auroranoaa = callPackage ../development/python-modules/auroranoaa { }; + auth0-python = callPackage ../development/python-modules/auth0-python { }; authheaders = callPackage ../development/python-modules/authheaders { }; @@ -4032,6 +4034,8 @@ in { metaphone = callPackage ../development/python-modules/metaphone { }; + metar = callPackage ../development/python-modules/metar { }; + mezzanine = callPackage ../development/python-modules/mezzanine { }; micawber = callPackage ../development/python-modules/micawber { }; From 838a98defb8bbe9b206e44435c9d0fa7c2836dc3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 13 Feb 2021 15:17:57 +0100 Subject: [PATCH 2/3] python3Packages.pynws: init 1.3.0 --- .../python-modules/pynws/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 +- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/python-modules/pynws/default.nix diff --git a/pkgs/development/python-modules/pynws/default.nix b/pkgs/development/python-modules/pynws/default.nix new file mode 100644 index 00000000000..abe4c93b818 --- /dev/null +++ b/pkgs/development/python-modules/pynws/default.nix @@ -0,0 +1,47 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, freezegun +, metar +, pytest-aiohttp +, pytest-asyncio +, pytest-cov +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pynws"; + version = "1.3.0"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "MatthewFlamm"; + repo = pname; + rev = "v${version}"; + sha256 = "13ipmx60kicwh8qxjazap4vk94x8i3r0lnkdsap7gffaizwgp49d"; + }; + + propagatedBuildInputs = [ + aiohttp + metar + ]; + + checkInputs = [ + freezegun + pytest-aiohttp + pytest-asyncio + pytest-cov + pytestCheckHook + ]; + + pythonImportsCheck = [ "pynws" ]; + + meta = with lib; { + description = "Python library to retrieve data from NWS/NOAA"; + homepage = "https://github.com/MatthewFlamm/pynws"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fd5ad52e58e..f7e239e50f8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -542,8 +542,6 @@ in { augeas = callPackage ../development/python-modules/augeas { inherit (pkgs) augeas; }; - auroranoaa = callPackage ../development/python-modules/auroranoaa { }; - auth0-python = callPackage ../development/python-modules/auth0-python { }; authheaders = callPackage ../development/python-modules/authheaders { }; @@ -4918,6 +4916,8 @@ in { pynuki = callPackage ../development/python-modules/pynuki { }; + pynws = callPackage ../development/python-modules/pynws { }; + pysbd = callPackage ../development/python-modules/pysbd { }; pyshark = callPackage ../development/python-modules/pyshark { }; From fe17d133a90941f549073159a263a750808a9d6a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 13 Feb 2021 15:18:45 +0100 Subject: [PATCH 3/3] home-assistant: update component-packages --- 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 40779f4bc19..54209498167 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -565,7 +565,7 @@ "numato" = ps: with ps; [ ]; # missing inputs: numato-gpio "number" = ps: with ps; [ ]; "nut" = ps: with ps; [ ]; # missing inputs: pynut2 - "nws" = ps: with ps; [ ]; # missing inputs: pynws + "nws" = ps: with ps; [ pynws ]; "nx584" = ps: with ps; [ ]; # missing inputs: pynx584 "nzbget" = ps: with ps; [ ]; # missing inputs: pynzbgetapi "oasa_telematics" = ps: with ps; [ ]; # missing inputs: oasatelematics