{ lib, buildPythonPackage, fetchFromGitHub, # build-system poetry-core, # dependencies scapy, # tests pytest-asyncio, pytestCheckHook, }: buildPythonPackage rec { pname = "aiodhcpwatcher"; version = "1.2.1"; pyproject = true; src = fetchFromGitHub { owner = "bdraco"; repo = "aiodhcpwatcher"; rev = "v${version}"; hash = "sha256-+BF3sBam8O9I4tY7QqnA4iNcJFsK9+imS8pY3N/v1HY="; }; postPatch = '' sed -i "/addopts =/d" pyproject.toml ''; build-system = [ poetry-core ]; dependencies = [ scapy ]; nativeCheckInputs = [ pytest-asyncio pytestCheckHook ]; preCheck = '' export HOME=$TMPDIR ''; pythonImportsCheck = [ "aiodhcpwatcher" ]; meta = with lib; { description = "Watch for DHCP packets with asyncio"; homepage = "https://github.com/bdraco/aiodhcpwatcher"; changelog = "https://github.com/bdraco/aiodhcpwatcher/blob/${src.rev}/CHANGELOG.md"; license = licenses.asl20; maintainers = with maintainers; [ hexa ]; platforms = platforms.linux; }; }