2021-02-19 09:55:45 +00:00
|
|
|
{ lib
|
|
|
|
, aiofiles
|
2023-09-01 07:55:18 +00:00
|
|
|
, async-timeout
|
2021-02-19 09:55:45 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy3k
|
|
|
|
, libusb1
|
|
|
|
, mock
|
|
|
|
, pyasn1
|
2022-01-12 09:04:40 +00:00
|
|
|
, pythonAtLeast
|
2021-02-19 09:55:45 +00:00
|
|
|
, pycryptodome
|
|
|
|
, pytestCheckHook
|
|
|
|
, rsa
|
|
|
|
}:
|
2020-09-24 08:32:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "adb-shell";
|
2023-09-01 07:55:18 +00:00
|
|
|
version = "0.4.4";
|
2022-01-12 09:04:40 +00:00
|
|
|
format = "setuptools";
|
2020-09-24 08:32:45 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JeffLIrion";
|
|
|
|
repo = "adb_shell";
|
|
|
|
rev = "v${version}";
|
2023-09-01 07:55:18 +00:00
|
|
|
hash = "sha256-pOkFUh3SEu/ch9R1lVoQn50nufQp8oI+D4/+Ybal5CA=";
|
2020-09-24 08:32:45 +00:00
|
|
|
};
|
|
|
|
|
2021-02-19 09:55:45 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
pyasn1
|
|
|
|
rsa
|
|
|
|
];
|
2020-09-24 08:32:45 +00:00
|
|
|
|
2022-05-22 14:26:11 +00:00
|
|
|
passthru.optional-dependencies = {
|
2022-04-07 03:15:13 +00:00
|
|
|
async = [
|
|
|
|
aiofiles
|
2023-09-01 07:55:18 +00:00
|
|
|
async-timeout
|
2022-04-07 03:15:13 +00:00
|
|
|
];
|
|
|
|
usb = [
|
|
|
|
libusb1
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-19 09:55:45 +00:00
|
|
|
mock
|
|
|
|
pycryptodome
|
|
|
|
pytestCheckHook
|
2023-09-01 07:55:18 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2021-02-19 09:55:45 +00:00
|
|
|
|
2022-01-12 09:04:40 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"adb_shell"
|
|
|
|
];
|
2020-09-24 08:32:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-02-19 09:55:45 +00:00
|
|
|
description = "Python implementation of ADB with shell and FileSync functionality";
|
2020-09-24 08:32:45 +00:00
|
|
|
homepage = "https://github.com/JeffLIrion/adb_shell";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
};
|
|
|
|
}
|