Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions pkgs/by-name/mt/mtkclient/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
lib,
fetchFromGitHub,
python3,
stdenv,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "mtkclient";
version = "2.0.1";

src = fetchFromGitHub {
owner = "bkerler";
repo = "mtkclient";
rev = "${finalAttrs.version}";
hash = "sha256-cEw+aaJcATtYnu+30usQv0JdTr1EiidrgwYSR49Bw5c=";
};

strictDeps = true;

buildInputs = [ finalAttrs.python ];

python = python3.withPackages (
ps: with ps; [
capstone
colorama
flake8
fusepy
keystone-engine
mock
pycryptodome
pycryptodomex
pyserial
pyside6
pyusb
setuptools
shiboken6
unicorn
wheel
]
);

installPhase = ''
runHook preInstall

mkdir -p $out/bin
cp -a . $out
ln -s $out/mtk.py $out/bin/mtk
ln -s $out/mtk_gui.py $out/bin/mtk_gui

runHook postInstall
'';

meta = {
description = "MTK reverse engineering and flash tool";
homepage = "https://github.com/bkerler/mtkclient";
maintainers = with lib.maintainers; [ kintrix ];
license = lib.licenses.gpl3Only;
mainProgram = "mtk";
sourceProvenance = with lib.sourceTypes; [ fromSource ];
};
})