Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, aiohttp 3, aioresponses 4, buildPythonPackage 5, fetchFromGitHub 6, poetry-core 7, pyroute2 8, pytest-asyncio 9, pytestCheckHook 10, pythonOlder 11}: 12 13buildPythonPackage rec { 14 pname = "unifi-discovery"; 15 version = "1.1.7"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.9"; 19 20 src = fetchFromGitHub { 21 owner = "bdraco"; 22 repo = pname; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-EQFk3kRY/JL1ZTDdHKzl0KbMUuhZSFc4tYqAYvsNSj0="; 25 }; 26 27 nativeBuildInputs = [ 28 poetry-core 29 ]; 30 31 propagatedBuildInputs = [ 32 aiohttp 33 pyroute2 34 ]; 35 36 nativeCheckInputs = [ 37 aioresponses 38 pytest-asyncio 39 pytestCheckHook 40 ]; 41 42 pytestFlagsArray = [ 43 "--asyncio-mode=auto" 44 ]; 45 46 postPatch = '' 47 substituteInPlace pyproject.toml \ 48 --replace "--cov=unifi_discovery --cov-report=term-missing:skip-covered" "" 49 ''; 50 51 pythonImportsCheck = [ 52 "unifi_discovery" 53 ]; 54 55 meta = with lib; { 56 description = "Module to discover Unifi devices"; 57 homepage = "https://github.com/bdraco/unifi-discovery"; 58 license = with licenses; [ asl20 ]; 59 maintainers = with maintainers; [ fab ]; 60 }; 61}