From b1cc8121ddc0630c3694c3bda1f5eafa7fec852b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Aug 2022 09:59:36 +0200 Subject: [PATCH] python310Packages.airthings-ble: init at 0.3.0 --- .../python-modules/airthings-ble/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/airthings-ble/default.nix diff --git a/pkgs/development/python-modules/airthings-ble/default.nix b/pkgs/development/python-modules/airthings-ble/default.nix new file mode 100644 index 000000000000..fbaae43b9789 --- /dev/null +++ b/pkgs/development/python-modules/airthings-ble/default.nix @@ -0,0 +1,46 @@ +{ lib +, bleak +, bleak-retry-connector +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pythonOlder +}: + +buildPythonPackage rec { + pname = "airthings-ble"; + version = "0.3.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "vincegio"; + repo = pname; + rev = "v${version}"; + hash = "sha256-E/+ObY/kO52J0nbyHGsBlqY5OYlnwf3ujAHEd1pEKvo="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bleak + bleak-retry-connector + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ + "airthings_ble" + ]; + + meta = with lib; { + description = "Library for Airthings BLE devices"; + homepage = "https://github.com/vincegio/airthings-ble"; + 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 77438d1d63a5..a66e6d5a87da 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -476,6 +476,8 @@ in { airly = callPackage ../development/python-modules/airly { }; + airthings-ble = callPackage ../development/python-modules/airthings-ble { }; + airthings-cloud = callPackage ../development/python-modules/airthings-cloud { }; airtouch4pyapi = callPackage ../development/python-modules/airtouch4pyapi { };