Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 bleak, 4 click, 5 buildPythonPackage, 6 fetchFromGitHub, 7 pytest-asyncio, 8 pytest-mock, 9 pythonAtLeast, 10 pytestCheckHook, 11 pythonOlder, 12}: 13 14buildPythonPackage rec { 15 pname = "pyzerproc"; 16 version = "0.4.12"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.9"; 20 21 src = fetchFromGitHub { 22 owner = "emlove"; 23 repo = pname; 24 rev = "refs/tags/${version}"; 25 hash = "sha256-vS0sk/KjDhWispZvCuGlmVLLfeFymHqxwNzNqNRhg6k="; 26 }; 27 28 postPatch = '' 29 sed -i "/--cov/d" setup.cfg 30 ''; 31 32 propagatedBuildInputs = [ 33 bleak 34 click 35 ]; 36 37 nativeCheckInputs = [ 38 pytest-asyncio 39 pytest-mock 40 pytestCheckHook 41 ]; 42 43 disabledTestPaths = lib.optionals (pythonAtLeast "3.11") [ 44 # unittest.mock.InvalidSpecError: Cannot spec a Mock object. 45 "tests/test_light.py" 46 ]; 47 48 pythonImportsCheck = [ "pyzerproc" ]; 49 50 meta = with lib; { 51 description = "Python library to control Zerproc Bluetooth LED smart string lights"; 52 mainProgram = "pyzerproc"; 53 homepage = "https://github.com/emlove/pyzerproc"; 54 license = with licenses; [ asl20 ]; 55 maintainers = with maintainers; [ fab ]; 56 platforms = platforms.linux; 57 }; 58}