1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 scapy, 11 12 # tests 13 pytest-asyncio, 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "aiodhcpwatcher"; 19 version = "1.0.1"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "bdraco"; 24 repo = "aiodhcpwatcher"; 25 rev = "v${version}"; 26 hash = "sha256-0of+no92s9SEKG1tc9lFlWR8f5Jnf3C723goQViB6+A="; 27 }; 28 29 postPatch = '' 30 sed -i "/addopts =/d" pyproject.toml 31 ''; 32 33 build-system = [ poetry-core ]; 34 35 dependencies = [ scapy ]; 36 37 nativeCheckInputs = [ 38 pytest-asyncio 39 pytestCheckHook 40 ]; 41 42 pythonImportsCheck = [ "aiodhcpwatcher" ]; 43 44 meta = with lib; { 45 description = "Watch for DHCP packets with asyncio"; 46 homepage = "https://github.com/bdraco/aiodhcpwatcher"; 47 changelog = "https://github.com/bdraco/aiodhcpwatcher/blob/${src.rev}/CHANGELOG.md"; 48 license = licenses.gpl3Only; 49 maintainers = with maintainers; [ hexa ]; 50 platforms = platforms.linux; 51 }; 52}