From c38750173d82346cfcc0c427c1dead5d691d611d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 25 Sep 2021 00:20:12 +0200 Subject: [PATCH] python3Packages.aiowatttime: init at 0.1.1 --- .../python-modules/aiowatttime/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/aiowatttime/default.nix diff --git a/pkgs/development/python-modules/aiowatttime/default.nix b/pkgs/development/python-modules/aiowatttime/default.nix new file mode 100644 index 000000000000..39aa7974313c --- /dev/null +++ b/pkgs/development/python-modules/aiowatttime/default.nix @@ -0,0 +1,53 @@ +{ lib +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-aiohttp +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aiowatttime"; + version = "0.1.1"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "1614p5ca7x9ipz7dgwhiz83dfwn6hyliawa8pr2j9y2kn8cg2sdm"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + aresponses + pytest-aiohttp + pytest-asyncio + pytestCheckHook + ]; + + # Ignore the examples directory as the files are prefixed with test_ + disabledTestPaths = [ "examples/" ]; + + pythonImportsCheck = [ "aiowatttime" ]; + + meta = with lib; { + description = "Python library for interacting with WattTime"; + homepage = "https://github.com/bachya/aiowatttime"; + 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 50803af17df7..ac6ecc0e66b5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -385,6 +385,8 @@ in { aiounittest = callPackage ../development/python-modules/aiounittest { }; + aiowatttime = callPackage ../development/python-modules/aiowatttime { }; + aiowinreg = callPackage ../development/python-modules/aiowinreg { }; aioymaps = callPackage ../development/python-modules/aioymaps { };