From 931dfbeb5185aa096c8b8b9663ceb8371fc85486 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 7 Mar 2024 02:09:26 +0100 Subject: [PATCH] python311Packages.aiodhcpwatcher: init at 0.8.0 --- .../python-modules/aiodhcpwatcher/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/aiodhcpwatcher/default.nix diff --git a/pkgs/development/python-modules/aiodhcpwatcher/default.nix b/pkgs/development/python-modules/aiodhcpwatcher/default.nix new file mode 100644 index 000000000000..9a860cfb832c --- /dev/null +++ b/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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 02906d76ef4c..5ee2ebf2831b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -193,6 +193,8 @@ self: super: with self; { aiocurrencylayer = callPackage ../development/python-modules/aiocurrencylayer { }; + aiodhcpwatcher = callPackage ../development/python-modules/aiodhcpwatcher { }; + aiodiscover = callPackage ../development/python-modules/aiodiscover { }; aiodns = callPackage ../development/python-modules/aiodns { };