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