From 7c915252f992ff871e3dfd31aaf08ace81dc684e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 9 Jun 2021 10:19:42 +0200 Subject: [PATCH] python3Packages.ambee: init at 0.2.1 --- .../python-modules/ambee/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/ambee/default.nix diff --git a/pkgs/development/python-modules/ambee/default.nix b/pkgs/development/python-modules/ambee/default.nix new file mode 100644 index 000000000000..b6fe6851aead --- /dev/null +++ b/pkgs/development/python-modules/ambee/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, aiohttp +, poetry-core +, yarl +, aresponses +, pytest-asyncio +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "ambee"; + version = "0.2.1"; + disabled = pythonOlder "3.8"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "frenck"; + repo = "python-ambee"; + rev = "v${version}"; + sha256 = "11liw2206lyrnx09giqapjpi25lr2qnbmigi6rgynr2a1i9vxy1s"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + yarl + ]; + + checkInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + ]; + + postPatch = '' + # Upstream doesn't set a version for the pyproject.toml + substituteInPlace pyproject.toml \ + --replace "0.0.0" "${version}" \ + --replace "--cov" "" + ''; + + pythonImportsCheck = [ "ambee" ]; + + meta = with lib; { + description = "Python client for Ambee API"; + homepage = "https://github.com/frenck/python-ambee"; + 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 c6d4128719f9..d58f8152c4a2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -385,6 +385,8 @@ in { amazon_kclpy = callPackage ../development/python-modules/amazon_kclpy { }; + ambee = callPackage ../development/python-modules/ambee { }; + ambiclimate = callPackage ../development/python-modules/ambiclimate { }; amcrest = callPackage ../development/python-modules/amcrest { };