2021-02-18 18:05:17 +00:00
|
|
|
{ lib
|
|
|
|
, asyncssh
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioasuswrt";
|
2021-04-02 08:56:25 +01:00
|
|
|
version = "1.3.3";
|
2021-02-18 18:05:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kennedyshead";
|
|
|
|
repo = pname;
|
|
|
|
rev = "V${version}";
|
2021-04-02 08:56:25 +01:00
|
|
|
sha256 = "1h1qwc7szgrcwiz4q6x4mlf26is20lj1ds5rcb9i611j26656v6d";
|
2021-02-18 18:05:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-04-02 08:56:25 +01:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "cryptography==3.3.2" "cryptography"
|
2021-02-18 18:05:17 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|