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