mtkclient: 2.1.2 -> 2.1.4.1 (+ udev, desktop item) (#497644)

This commit is contained in:
Marcin Serwin
2026-04-05 12:41:37 +00:00
committed by GitHub
+35 -3
View File
@@ -1,19 +1,23 @@
{
lib,
copyDesktopItems,
fetchFromGitHub,
gcc-arm-embedded,
makeDesktopItem,
python3Packages,
udevCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "mtkclient";
version = "2.1.2";
version = "2.1.4.1";
pyproject = true;
src = fetchFromGitHub {
owner = "bkerler";
repo = "mtkclient";
rev = "v${version}";
hash = "sha256-mbfuOYJvwHfDvjTtAgMBLi7REIRRcJ9bhkY5oVjxCAM=";
hash = "sha256-8Y9tyw+dmhhc4tFo3slr4wQIPXIrmIk/wuCK4aM6oLY=";
};
build-system = [ python3Packages.hatchling ];
@@ -29,10 +33,38 @@ python3Packages.buildPythonApplication rec {
shiboken6
];
nativeBuildInputs = [
udevCheckHook
copyDesktopItems
# Dependencies for stage1 kamakiri payloads
gcc-arm-embedded
];
pythonImportsCheck = [ "mtkclient" ];
# Note: No need to install mtkclient udev rules, 50-android.rules is covered by
# Build on-device payloads from source before assembling into a python package.
preBuild = ''
make -C src/stage1
'';
# Note: No need to install other 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).
postInstall = ''
install -Dm444 Setup/Linux/52-mtk.rules -t $out/lib/udev/rules.d
'';
desktopItems = [
(makeDesktopItem {
name = "mtkclient";
desktopName = "MTKClient";
comment = "Mediatek Flash and Repair Utility";
exec = "mtk_gui";
categories = [
"Development"
];
})
];
meta = {
description = "MTK reverse engineering and flash tool";