Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / aioasuswrt / default.nix
blobedd2796eca485f9032121ba6717f6f6c726b44e3
1 { lib
2 , asyncssh
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pytest-asyncio
6 , pytest-mock
7 , pytestCheckHook
8 }:
10 buildPythonPackage rec {
11   pname = "aioasuswrt";
12   version = "1.3.3";
14   src = fetchFromGitHub {
15     owner = "kennedyshead";
16     repo = pname;
17     rev = "V${version}";
18     sha256 = "1h1qwc7szgrcwiz4q6x4mlf26is20lj1ds5rcb9i611j26656v6d";
19   };
21   postPatch = ''
22     substituteInPlace setup.py \
23       --replace "cryptography==3.3.2" "cryptography"
24     substituteInPlace setup.cfg \
25       --replace "--cov-report html" "" \
26       --replace "--cov-report term-missing" ""
27   '';
29   propagatedBuildInputs = [ asyncssh ];
31   checkInputs = [
32     pytest-asyncio
33     pytest-mock
34     pytestCheckHook
35   ];
37   pythonImportsCheck = [ "aioasuswrt" ];
39   meta = with lib; {
40     description = "Python module for Asuswrt";
41     homepage = "https://github.com/kennedyshead/aioasuswrt";
42     license = with licenses; [ mit ];
43     maintainers = with maintainers; [ fab ];
44   };