nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, aiohttp
3, aioresponses
4, buildPythonPackage
5, fetchFromGitHub
6, pytest-aiohttp
7, pytest-asyncio
8, pytestCheckHook
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "aiounifi";
14 version = "31";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "Kane610";
20 repo = pname;
21 rev = "v${version}";
22 sha256 = "sha256-8Hm7sUkIW4rVLCL5+vHfhAvmc8+IKDXaSLtYJTf14XY=";
23 };
24
25 propagatedBuildInputs = [
26 aiohttp
27 ];
28
29 checkInputs = [
30 aioresponses
31 pytest-aiohttp
32 pytest-asyncio
33 pytestCheckHook
34 ];
35
36 pytestFlagsArray = [
37 "--asyncio-mode=auto"
38 ];
39
40 pythonImportsCheck = [ "aiounifi" ];
41
42 meta = with lib; {
43 description = "Python library for communicating with Unifi Controller API";
44 homepage = "https://github.com/Kane610/aiounifi";
45 license = licenses.mit;
46 maintainers = with maintainers; [ peterhoeg ];
47 };
48}