about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/connect-box/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/connect-box/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/connect-box/default.nix38
1 files changed, 28 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/connect-box/default.nix b/nixpkgs/pkgs/development/python-modules/connect-box/default.nix
index b7ba433478b2..34ca8dbb01df 100644
--- a/nixpkgs/pkgs/development/python-modules/connect-box/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/connect-box/default.nix
@@ -3,36 +3,54 @@
 , attrs
 , buildPythonPackage
 , defusedxml
-, fetchPypi
+, fetchFromGitHub
 , pythonOlder
+, pytest-asyncio
+, pytestCheckHook
+, setuptools
+, pytest-vcr
+, syrupy
 }:
 
 buildPythonPackage rec {
   pname = "connect-box";
-  version = "0.3.1";
-  format = "setuptools";
+  version = "0.4.0";
+  pyproject = true;
 
-  disabled = pythonOlder "3.9";
+  disabled = pythonOlder "3.10";
 
-  src = fetchPypi {
-    pname = "connect_box";
-    inherit version;
-    hash = "sha256-x1ozcj3IL+iI/QtS12yEudCqNknCmyb5ew88Z39xaLA=";
+  src = fetchFromGitHub {
+    owner = "home-assistant-ecosystem";
+    repo = "python-connect-box";
+    rev = "refs/tags/${version}";
+    hash = "sha256-zUvZRnxVzg9izvUbp7QVcyu6Bw3dUXHOr0kOQRWEZVc=";
   };
 
+  nativeBuildInputs = [
+    setuptools
+  ];
+
   propagatedBuildInputs = [
     aiohttp
     attrs
     defusedxml
   ];
 
-  # No tests are present
-  doCheck = false;
+  nativeCheckInputs = [
+    pytest-asyncio
+    pytestCheckHook
+    pytest-vcr
+    syrupy
+  ];
 
   pythonImportsCheck = [
     "connect_box"
   ];
 
+  pytestFlagsArray = [
+    "--vcr-record=none"
+  ];
+
   meta = with lib; {
     description = "Interact with a Compal CH7465LG cable modem/router";
     longDescription = ''