From 50dfb6babddbceef8cdd0f3d3fef76723325c09f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Feb 2021 11:42:20 +0100 Subject: [PATCH 1/3] python3Packages.aiocache: init at 0.11.1 --- .../python-modules/aiocache/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/aiocache/default.nix diff --git a/pkgs/development/python-modules/aiocache/default.nix b/pkgs/development/python-modules/aiocache/default.nix new file mode 100644 index 000000000000..54979dbd7ba4 --- /dev/null +++ b/pkgs/development/python-modules/aiocache/default.nix @@ -0,0 +1,34 @@ +{ lib +, aioredis +, buildPythonPackage +, fetchFromGitHub +, msgpack +}: + +buildPythonPackage rec { + pname = "aiocache"; + version = "0.11.1"; + + src = fetchFromGitHub { + owner = "aio-libs"; + repo = pname; + rev = version; + sha256 = "1czs8pvhzi92qy2dch2995rb62mxpbhd80dh2ir7zpa9qcm6wxvx"; + }; + + propagatedBuildInputs = [ + aioredis + msgpack + ]; + + # aiomcache would be required but last release was in 2017 + doCheck = false; + pythonImportsCheck = [ "aiocache" ]; + + meta = with lib; { + description = "Python API Rate Limit Decorator"; + homepage = "https://github.com/tomasbasham/ratelimit"; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 88b66b1420e9..033545daf338 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -210,6 +210,8 @@ in { aioasuswrt = callPackage ../development/python-modules/aioasuswrt { }; + aiocache = callPackage ../development/python-modules/aiocache { }; + aiocoap = callPackage ../development/python-modules/aiocoap { }; aioconsole = callPackage ../development/python-modules/aioconsole { }; From 85b71a30c1c176e1389ab6afcb952a7aebc2e501 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Feb 2021 11:51:23 +0100 Subject: [PATCH 2/3] python3Packages.pyflunearyou: init at 2.0.0 --- .../python-modules/pyflunearyou/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/pyflunearyou/default.nix diff --git a/pkgs/development/python-modules/pyflunearyou/default.nix b/pkgs/development/python-modules/pyflunearyou/default.nix new file mode 100644 index 000000000000..9b77cc61de69 --- /dev/null +++ b/pkgs/development/python-modules/pyflunearyou/default.nix @@ -0,0 +1,56 @@ +{ lib +, aiohttp +, aresponses +, aiocache +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytest-aiohttp +, pytestCheckHook +, pythonOlder +, msgpack +, ujson +}: + +buildPythonPackage rec { + pname = "pyflunearyou"; + version = "2.0.0"; + format = "pyproject"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "18vxwfyvicbx8idpa0h0alp4ygnwfph6g4kq93hfm0fc94gi6h94"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + aiohttp + aiocache + msgpack + ujson + ]; + + checkInputs = [ + aresponses + pytest-asyncio + pytest-aiohttp + pytestCheckHook + ]; + + # Ignore the examples directory as the files are prefixed with test_. + # disabledTestFiles doesn't seem to work here + pytestFlagsArray = [ "--ignore examples/" ]; + pythonImportsCheck = [ "pyflunearyou" ]; + + meta = with lib; { + description = "Python library for retrieving UV-related information from Flu Near You"; + homepage = "https://github.com/bachya/pyflunearyou"; + 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 033545daf338..63de89989191 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5468,6 +5468,8 @@ in { pyflume = callPackage ../development/python-modules/pyflume { }; + pyflunearyou = callPackage ../development/python-modules/pyflunearyou { }; + pyfma = callPackage ../development/python-modules/pyfma { }; pyfribidi = callPackage ../development/python-modules/pyfribidi { }; From 98efd456135fb91cbef0c1524d65674e3fee70d3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Feb 2021 12:17:36 +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 a4e480c45507..febfc7fdea75 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -265,7 +265,7 @@ "flo" = ps: with ps; [ aioflo ]; "flock" = ps: with ps; [ ]; "flume" = ps: with ps; [ pyflume ]; - "flunearyou" = ps: with ps; [ ]; # missing inputs: pyflunearyou + "flunearyou" = ps: with ps; [ pyflunearyou ]; "flux" = ps: with ps; [ ]; "flux_led" = ps: with ps; [ flux-led ]; "folder" = ps: with ps; [ ];