diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/aiodhcpwatcher/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/aiodhcpwatcher/default.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/aiodhcpwatcher/default.nix b/nixpkgs/pkgs/development/python-modules/aiodhcpwatcher/default.nix new file mode 100644 index 000000000000..9a860cfb832c --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/aiodhcpwatcher/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub + +# build-system +, poetry-core + +# dependencies +, scapy + +# tests +, pytest-asyncio +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "aiodhcpwatcher"; + version = "0.8.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "bdraco"; + repo = "aiodhcpwatcher"; + rev = "v${version}"; + hash = "sha256-zZigXYUDSbXjlH810CgLa56xWYKcStBeKUbgsZ5WjOw="; + }; + + postPatch = '' + sed -i "/addopts =/d" pyproject.toml + ''; + + build-system = [ + poetry-core + ]; + + dependencies = [ + scapy + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + 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.gpl3Only; + maintainers = with maintainers; [ hexa ]; + }; +} |