1{ 2 lib, 3 aiohttp, 4 asynctest, 5 buildPythonPackage, 6 fetchFromGitHub, 7 pytest-asyncio, 8 pytestCheckHook, 9 pythonOlder, 10}: 11 12buildPythonPackage rec { 13 pname = "pyversasense"; 14 version = "0.0.6"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "imstevenxyz"; 21 repo = "pyversasense"; 22 rev = "v${version}"; 23 sha256 = "vTaDEwImWDMInwti0Jj+j+RFEtXOOKtiH5wOMD6ZmJk="; 24 }; 25 26 propagatedBuildInputs = [ aiohttp ]; 27 28 doCheck = pythonOlder "3.11"; # asynctest unsupported on python3.11 29 30 nativeCheckInputs = [ 31 asynctest 32 pytest-asyncio 33 pytestCheckHook 34 ]; 35 36 enabledTestPaths = [ "tests/test.py" ]; 37 38 disabledTests = [ 39 # Tests are not properly mocking network requests 40 "test_device_mac" 41 "test_peripheral_id" 42 "test_peripheral_measurements" 43 "test_samples" 44 ]; 45 46 pythonImportsCheck = [ "pyversasense" ]; 47 48 meta = with lib; { 49 description = "Python library to communicate with the VersaSense API"; 50 homepage = "https://github.com/imstevenxyz/pyversasense"; 51 license = licenses.asl20; 52 maintainers = with maintainers; [ fab ]; 53 }; 54}