depot/third_party/nixpkgs/pkgs/development/python-modules/unifi-discovery/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

58 lines
1.2 KiB
Nix

{
lib,
aiohttp,
aioresponses,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pyroute2,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "unifi-discovery";
version = "1.1.8";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "bdraco";
repo = "unifi-discovery";
rev = "refs/tags/v${version}";
hash = "sha256-gE/2awyhDACrc0nuTvTPOcK2lFbPIZAXDPRnVJtWFco=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "--cov=unifi_discovery --cov-report=term-missing:skip-covered" ""
'';
build-system = [ poetry-core ];
dependencies = [
aiohttp
pyroute2
];
nativeCheckInputs = [
aioresponses
pytest-asyncio
pytestCheckHook
];
pytestFlagsArray = [ "--asyncio-mode=auto" ];
pythonImportsCheck = [ "unifi_discovery" ];
meta = with lib; {
description = "Module to discover Unifi devices";
homepage = "https://github.com/bdraco/unifi-discovery";
changelog = "https://github.com/bdraco/unifi-discovery/releases/tag/v${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
platforms = platforms.linux;
};
}