2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, adb-shell
|
|
|
|
, aiofiles
|
2023-10-09 19:29:22 +00:00
|
|
|
, async-timeout
|
2021-02-05 17:12:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
|
|
|
, pure-python-adb
|
|
|
|
, pytestCheckHook
|
2022-02-10 20:34:41 +00:00
|
|
|
, pythonOlder
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "androidtv";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.0.73";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JeffLIrion";
|
|
|
|
repo = "python-androidtv";
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-FJUTJfS9jiC7KDf6XcGVRNXf75bVUOBPZe8y9M39Uak=";
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
adb-shell
|
2023-10-09 19:29:22 +00:00
|
|
|
async-timeout
|
2022-02-10 20:34:41 +00:00
|
|
|
pure-python-adb
|
|
|
|
];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2022-04-15 01:41:22 +00:00
|
|
|
async = [
|
|
|
|
aiofiles
|
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
inherit (adb-shell.optional-dependencies) usb;
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2022-04-15 01:41:22 +00:00
|
|
|
]
|
2022-06-16 17:23:12 +00:00
|
|
|
++ passthru.optional-dependencies.async
|
|
|
|
++ passthru.optional-dependencies.usb;
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Requires git but fails anyway
|
|
|
|
"test_no_underscores"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"androidtv"
|
|
|
|
];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-02-10 20:34:41 +00:00
|
|
|
description = "Communicate with an Android TV or Fire TV device via ADB over a network";
|
2020-10-07 09:15:18 +00:00
|
|
|
homepage = "https://github.com/JeffLIrion/python-androidtv/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
};
|
|
|
|
}
|