From b66b8db0ff42393c59172956148673f026ce08ea Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 19 Dec 2021 15:38:20 +0100 Subject: [PATCH] python3Packages.pyweatherflowrest: init at 0.1.21 --- .../pyweatherflowrest/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/pyweatherflowrest/default.nix diff --git a/pkgs/development/python-modules/pyweatherflowrest/default.nix b/pkgs/development/python-modules/pyweatherflowrest/default.nix new file mode 100644 index 000000000000..ccbf21fb90d1 --- /dev/null +++ b/pkgs/development/python-modules/pyweatherflowrest/default.nix @@ -0,0 +1,44 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyweatherflowrest"; + version = "0.1.21"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "briis"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-lW7mhjCYrPBsHL0plHZo6L3OwZFHAzBK2TtNVre5Lt8="; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--cov=pyweatherflowrest --cov-append" "" + ''; + + # Module has no tests. test.py is a demo script + doCheck = false; + + pythonImportsCheck = [ + "pyweatherflowrest" + ]; + + meta = with lib; { + description = "Python module to get data from WeatherFlow Weather Stations"; + homepage = "https://github.com/briis/pyweatherflowrest"; + 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 41656c24a549..2169da91a58f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8065,6 +8065,8 @@ in { inherit (pkgs) libxml2; }; + pyweatherflowrest = callPackage ../development/python-modules/pyweatherflowrest { }; + pywebpush = callPackage ../development/python-modules/pywebpush { }; pywebview = callPackage ../development/python-modules/pywebview { };