mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
57 lines
1.0 KiB
Nix
57 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
poetry-core,
|
|
|
|
# dependencies
|
|
scapy,
|
|
|
|
# tests
|
|
pytest-asyncio,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aiodhcpwatcher";
|
|
version = "1.0.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bdraco";
|
|
repo = "aiodhcpwatcher";
|
|
rev = "v${version}";
|
|
hash = "sha256-KZL5DejzDmizvvMUNfkFltl1xXz+2jX/3DVj60x6xOk=";
|
|
};
|
|
|
|
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.gpl3Only;
|
|
maintainers = with maintainers; [ hexa ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|