2021-02-03 07:50:06 +00:00
|
|
|
{ lib
|
|
|
|
, adb-shell
|
|
|
|
, aiofiles
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy3k
|
|
|
|
, mock
|
|
|
|
, pure-python-adb
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-09-24 09:33:12 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "androidtv";
|
2021-02-22 22:53:14 +00:00
|
|
|
version = "0.0.58";
|
2020-09-24 09:33:12 +01:00
|
|
|
|
|
|
|
# pypi does not contain tests, using github sources instead
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JeffLIrion";
|
|
|
|
repo = "python-androidtv";
|
|
|
|
rev = "v${version}";
|
2021-02-22 22:53:14 +00:00
|
|
|
sha256 = "sha256-/5sYiYRFa8XJJ4QSxLzJBHaKfAKsGETiVDHerNQ79U8=";
|
2020-09-24 09:33:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ adb-shell pure-python-adb ]
|
|
|
|
++ lib.optionals (isPy3k) [ aiofiles ];
|
|
|
|
|
2021-02-03 07:50:06 +00:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "androidtv" ];
|
2020-09-24 09:33:12 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description =
|
2021-02-03 07:50:06 +00:00
|
|
|
"Communicate with an Android TV or Fire TV device via ADB over a network";
|
2020-09-24 09:33:12 +01:00
|
|
|
homepage = "https://github.com/JeffLIrion/python-androidtv/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
};
|
|
|
|
}
|