at master 1.3 kB view raw
1{ 2 lib, 3 bleak, 4 buildPythonPackage, 5 fetchFromGitHub, 6 fetchpatch, 7 pytestCheckHook, 8 pythonOlder, 9 requests, 10 setuptools, 11}: 12 13buildPythonPackage rec { 14 pname = "aranet4"; 15 version = "2.5.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "Anrijs"; 22 repo = "Aranet4-Python"; 23 tag = "v${version}"; 24 hash = "sha256-/FBrP4aceIX9dcZmm+k13PSAPuK4SQenjWqOAFPSvL8="; 25 }; 26 27 patches = [ 28 # https://github.com/Anrijs/Aranet4-Python/pull/62 29 (fetchpatch { 30 name = "fix-for-failing-test-with-bleak-1.1.0.patch"; 31 url = "https://github.com/Anrijs/Aranet4-Python/pull/62/commits/0117633682050c77cd00ead1bce93375367d7a3c.patch"; 32 hash = "sha256-S4Di6bKbapCpDdOIy4sSiG9dO7OZq5ixjjK+ux4EEp0="; 33 }) 34 ]; 35 36 build-system = [ setuptools ]; 37 38 dependencies = [ 39 bleak 40 requests 41 ]; 42 43 nativeCheckInputs = [ pytestCheckHook ]; 44 45 pythonImportsCheck = [ "aranet4" ]; 46 47 disabledTests = [ 48 # Test compares rendered output 49 "test_current_values" 50 ]; 51 52 meta = with lib; { 53 description = "Module to interact with Aranet4 devices"; 54 homepage = "https://github.com/Anrijs/Aranet4-Python"; 55 license = with licenses; [ mit ]; 56 maintainers = with maintainers; [ fab ]; 57 mainProgram = "aranetctl"; 58 }; 59}