From e9917797b1fd7db215fd21dae10ce0baf2265133 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Fri, 23 Dec 2022 22:46:30 -0800 Subject: [PATCH 1/2] pythonPackages.btsmarthub_devicelist: init at 0.2.3 --- .../btsmarthub_devicelist/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/btsmarthub_devicelist/default.nix diff --git a/pkgs/development/python-modules/btsmarthub_devicelist/default.nix b/pkgs/development/python-modules/btsmarthub_devicelist/default.nix new file mode 100644 index 000000000000..540155c07c62 --- /dev/null +++ b/pkgs/development/python-modules/btsmarthub_devicelist/default.nix @@ -0,0 +1,44 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + requests, + responses, +}: +buildPythonPackage rec { + pname = "btsmarthub_devicelist"; + version = "0.2.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "jxwolstenholme"; + repo = "btsmarthub_devicelist"; + rev = "${version}"; + hash = "sha256-7ncxCpY+A2SuSFa3k21QchrmFs1dPRUMb1r1z/laa6M="; + }; + + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + responses + requests + pytestCheckHook + ]; + + disabledTests = [ + "test_btsmarthub2_detection_neither_router_present" + ]; + + meta = with lib; { + description = "Retrieve a list of devices from a bt smarthub or bt smarthub 2 on a local network"; + homepage = "https://github.com/jxwolstenholme/btsmarthub_devicelist"; + license = licenses.mit; + maintainers = with maintainers; [jamiemagee]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e51082db63f6..d2aa9dad8af3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1443,6 +1443,8 @@ self: super: with self; { btrfsutil = callPackage ../development/python-modules/btrfsutil { }; + btsmarthub_devicelist = callPackage ../development/python-modules/btsmarthub_devicelist { }; + btsocket = callPackage ../development/python-modules/btsocket { }; bucketstore = callPackage ../development/python-modules/bucketstore { }; From 0619c5f5ab6631797c8641a6167766432967e048 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Fri, 23 Dec 2022 23:05:22 -0800 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 7b8fdcff2b10..b72fa929a7db 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -429,7 +429,8 @@ "bt_home_hub_5" = ps: with ps; [ ]; # missing inputs: bthomehub5-devicelist "bt_smarthub" = ps: with ps; [ - ]; # missing inputs: btsmarthub_devicelist + btsmarthub_devicelist + ]; "bthome" = ps: with ps; [ aiohttp-cors bleak-retry-connector