2018-11-18 12:51:06 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, build-tools }:
|
2014-05-22 13:29:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "apktool";
|
2019-12-08 02:30:54 +00:00
|
|
|
version = "2.4.1";
|
2014-05-22 13:29:36 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-24 18:05:31 +00:00
|
|
|
urls = [
|
|
|
|
"https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_${version}.jar"
|
|
|
|
"https://github.com/iBotPeaches/Apktool/releases/download/v${version}/apktool_${version}.jar"
|
|
|
|
];
|
2019-12-08 02:30:54 +00:00
|
|
|
sha256 = "0ljsh8nx065isnyzzrwddypikkfhyqsww0w02cgwgh8x3lhndsxx";
|
2014-05-22 13:29:36 +00:00
|
|
|
};
|
|
|
|
|
2017-01-26 01:45:36 +00:00
|
|
|
phases = [ "installPhase" ];
|
2014-05-22 13:29:36 +00:00
|
|
|
|
2017-01-26 01:45:36 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2014-05-22 13:29:36 +00:00
|
|
|
|
2015-07-28 00:55:55 +00:00
|
|
|
sourceRoot = ".";
|
|
|
|
|
2014-05-22 13:29:36 +00:00
|
|
|
installPhase = ''
|
2017-01-26 01:45:36 +00:00
|
|
|
install -D ${src} "$out/libexec/apktool/apktool.jar"
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p "$out/bin"
|
2014-05-22 13:29:36 +00:00
|
|
|
makeWrapper "${jre}/bin/java" "$out/bin/apktool" \
|
|
|
|
--add-flags "-jar $out/libexec/apktool/apktool.jar" \
|
2018-11-18 12:51:06 +00:00
|
|
|
--prefix PATH : "${builtins.head build-tools}/libexec/android-sdk/build-tools/28.0.3"
|
2014-05-22 13:29:36 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A tool for reverse engineering Android apk files";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://ibotpeaches.github.io/Apktool/";
|
2014-05-22 13:29:36 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ offline ];
|
2017-01-26 01:45:36 +00:00
|
|
|
platforms = with platforms; unix;
|
2014-05-22 13:29:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|