Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 aiohttp, 3 aioresponses, 4 lib, 5 buildPythonPackage, 6 fetchFromGitHub, 7 mashumaro, 8 orjson, 9 poetry-core, 10 pythonOlder, 11 pytestCheckHook, 12 pytest-aiohttp, 13 syrupy, 14 yarl, 15}: 16 17buildPythonPackage rec { 18 pname = "knocki"; 19 version = "0.3.1"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.11"; 23 24 src = fetchFromGitHub { 25 owner = "swan-solutions"; 26 repo = "knocki-homeassistant"; 27 rev = "v${version}"; 28 hash = "sha256-tWtANsujAcdIddoUBrKWIPfiPzDqWhW94Goz0QQ2BfE="; 29 }; 30 31 postPatch = '' 32 substituteInPlace pyproject.toml \ 33 --replace-fail "addopts = \"--cov\"" "" 34 ''; 35 36 build-system = [ poetry-core ]; 37 38 dependencies = [ 39 aiohttp 40 mashumaro 41 orjson 42 yarl 43 ]; 44 45 nativeCheckInputs = [ 46 aioresponses 47 pytestCheckHook 48 pytest-aiohttp 49 syrupy 50 ]; 51 52 pythonImportsCheck = [ "knocki" ]; 53 54 meta = with lib; { 55 description = "Asynchronous Python client for Knocki vibration / door sensors"; 56 homepage = "https://github.com/swan-solutions/knocki-homeassistant"; 57 license = licenses.mit; 58 maintainers = with maintainers; [ mindstorms6 ]; 59 }; 60}