diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-05-22 14:07:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-22 14:07:26 +0200 |
commit | 0126611ad8832abedd55031ecf0aadfd3e093e9a (patch) | |
tree | 875ff08f893db86bb32590b90787904c37bed4d5 /pkgs | |
parent | 0f18fa202025355fd21f239466fa6fc9fd68d312 (diff) | |
parent | 787ef6045f13b4aac312db48385793c42f484789 (diff) |
Merge pull request #313635 from fabaff/unifi-discovery-darwin
python312Packages.unifi-discovery: limit platform support
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/unifi-discovery/default.nix | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/pkgs/development/python-modules/unifi-discovery/default.nix b/pkgs/development/python-modules/unifi-discovery/default.nix index 760b9f96c89ba..1bfcce4e430e4 100644 --- a/pkgs/development/python-modules/unifi-discovery/default.nix +++ b/pkgs/development/python-modules/unifi-discovery/default.nix @@ -1,34 +1,38 @@ -{ lib -, aiohttp -, aioresponses -, buildPythonPackage -, fetchFromGitHub -, poetry-core -, pyroute2 -, pytest-asyncio -, pytestCheckHook -, pythonOlder +{ + lib, + aiohttp, + aioresponses, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + pyroute2, + pytest-asyncio, + pytestCheckHook, + pythonOlder, }: buildPythonPackage rec { pname = "unifi-discovery"; version = "1.1.8"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "bdraco"; - repo = pname; + repo = "unifi-discovery"; rev = "refs/tags/v${version}"; hash = "sha256-gE/2awyhDACrc0nuTvTPOcK2lFbPIZAXDPRnVJtWFco="; }; - nativeBuildInputs = [ - poetry-core - ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "--cov=unifi_discovery --cov-report=term-missing:skip-covered" "" + ''; + + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp pyroute2 ]; @@ -39,23 +43,16 @@ buildPythonPackage rec { pytestCheckHook ]; - pytestFlagsArray = [ - "--asyncio-mode=auto" - ]; + pytestFlagsArray = [ "--asyncio-mode=auto" ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace "--cov=unifi_discovery --cov-report=term-missing:skip-covered" "" - ''; - - pythonImportsCheck = [ - "unifi_discovery" - ]; + 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; }; } |