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 e4e072dce936..c0c04d2a9728 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 { };