Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98452 from JamieMagee/adb-shell
pythonPackages.{pure-python-adb,adb-shell,androidtv}: init
- Loading branch information
Showing
5 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ aiofiles, buildPythonPackage, cryptography, fetchFromGitHub, isPy3k, lib | ||
, libusb1, mock, pyasn1, python, pycryptodome, rsa }: | ||
|
||
buildPythonPackage rec { | ||
pname = "adb-shell"; | ||
version = "0.2.3"; | ||
|
||
disabled = !isPy3k; | ||
|
||
# pypi does not contain tests, using github sources instead | ||
src = fetchFromGitHub { | ||
owner = "JeffLIrion"; | ||
repo = "adb_shell"; | ||
rev = "v${version}"; | ||
sha256 = "1ay598avmg656cxnc9phdx43z1plsrfjf9png9jwjwyhyjjiqxil"; | ||
}; | ||
|
||
propagatedBuildInputs = [ aiofiles cryptography libusb1 pyasn1 rsa ]; | ||
|
||
checkInputs = [ mock pycryptodome ]; | ||
checkPhase = '' | ||
${python.interpreter} -m unittest discover -s tests -t . | ||
''; | ||
|
||
meta = with lib; { | ||
description = | ||
"A Python implementation of ADB with shell and FileSync functionality."; | ||
homepage = "https://github.com/JeffLIrion/adb_shell"; | ||
license = licenses.asl20; | ||
maintainers = with maintainers; [ jamiemagee ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ aiofiles, adb-shell, buildPythonPackage, fetchFromGitHub, isPy3k, lib, mock | ||
, pure-python-adb, python }: | ||
|
||
buildPythonPackage rec { | ||
pname = "androidtv"; | ||
version = "0.0.50"; | ||
|
||
# pypi does not contain tests, using github sources instead | ||
src = fetchFromGitHub { | ||
owner = "JeffLIrion"; | ||
repo = "python-androidtv"; | ||
rev = "v${version}"; | ||
sha256 = "1iqw40szwgzvhv3fbnx2wwfnw0d3clcwk9vsq1xsn30fjil2vl7b"; | ||
}; | ||
|
||
propagatedBuildInputs = [ adb-shell pure-python-adb ] | ||
++ lib.optionals (isPy3k) [ aiofiles ]; | ||
|
||
checkInputs = [ mock ]; | ||
checkPhase = '' | ||
${python.interpreter} -m unittest discover -s tests -t . | ||
''; | ||
|
||
meta = with lib; { | ||
description = | ||
"Communicate with an Android TV or Fire TV device via ADB over a network."; | ||
homepage = "https://github.com/JeffLIrion/python-androidtv/"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ jamiemagee ]; | ||
}; | ||
} |
26 changes: 26 additions & 0 deletions
26
pkgs/development/python-modules/pure-python-adb/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ aiofiles, buildPythonPackage, fetchPypi, lib, pythonOlder }: | ||
|
||
buildPythonPackage rec { | ||
pname = "pure-python-adb"; | ||
version = "0.3.0.dev0"; | ||
|
||
disabled = pythonOlder "3.6"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "0kdr7w2fhgjpcf1k3l6an9im583iqkr6v8hb4q1zw30nh3bqkk0f"; | ||
}; | ||
|
||
propagatedBuildInputs = [ aiofiles ]; | ||
# Disable tests as they require docker, docker-compose and a dedicated | ||
# android emulator | ||
doCheck = false; | ||
pythonImportsCheck = [ "ppadb.client" "ppadb.client_async" ]; | ||
|
||
meta = with lib; { | ||
description = "Pure python implementation of the adb client"; | ||
homepage = "https://github.com/Swind/pure-python-adb"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ jamiemagee ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters