about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/aioasuswrt/default.nix
blob: a6bd79e80ef109a231344bc35cabd41ec4ff784e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ lib
, asyncssh
, buildPythonPackage
, fetchFromGitHub
, pytest-asyncio
, pytest-mock
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "aioasuswrt";
  version = "1.3.4";

  src = fetchFromGitHub {
    owner = "kennedyshead";
    repo = pname;
    rev = version;
    sha256 = "101d76zarvilzfmcy8n3bjqzyars8hsjzr0zc80d4rngv4vhrki1";
  };

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace "--cov-report html" "" \
      --replace "--cov-report term-missing" ""
  '';

  propagatedBuildInputs = [ asyncssh ];

  checkInputs = [
    pytest-asyncio
    pytest-mock
    pytestCheckHook
  ];

  pythonImportsCheck = [ "aioasuswrt" ];

  meta = with lib; {
    description = "Python module for Asuswrt";
    homepage = "https://github.com/kennedyshead/aioasuswrt";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}