51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
python3Packages,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication {
|
|
pname = "mtkclient";
|
|
version = "2.0.1-unstable-2025-09-26";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bkerler";
|
|
repo = "mtkclient";
|
|
rev = "399b3a1c25e73ddf4951f12efd20f7254ee04a39";
|
|
hash = "sha256-XNPYeVhp5P+zQdumS9IzlUd5+WebL56qcgs10WS2/LY=";
|
|
};
|
|
|
|
build-system = [ python3Packages.hatchling ];
|
|
|
|
dependencies = with python3Packages; [
|
|
colorama
|
|
fusepy
|
|
pycryptodome
|
|
pycryptodomex
|
|
pyserial
|
|
pyside6
|
|
pyusb
|
|
shiboken6
|
|
];
|
|
|
|
pythonImportsCheck = [ "mtkclient" ];
|
|
|
|
# Note: No need to install mtkclient udev rules, 50-android.rules is covered by
|
|
# systemd 258 or newer and 51-edl.rules only applies to Qualcomm (i.e. not MTK).
|
|
|
|
meta = {
|
|
description = "MTK reverse engineering and flash tool";
|
|
homepage = "https://github.com/bkerler/mtkclient";
|
|
mainProgram = "mtk";
|
|
license = lib.licenses.gpl3;
|
|
sourceProvenance = with lib.sourceTypes; [
|
|
# loaders, preloaders and exploit payloads
|
|
binaryFirmware
|
|
# everything else
|
|
fromSource
|
|
];
|
|
maintainers = [ lib.maintainers.timschumi ];
|
|
};
|
|
}
|