2014-05-22 14:29:36 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, buildTools }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "apktool-${version}";
|
2017-08-01 05:35:14 +01:00
|
|
|
version = "2.2.4";
|
2014-05-22 14:29:36 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-01-26 01:45:36 +00:00
|
|
|
url = "https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_${version}.jar";
|
2017-08-01 05:35:14 +01:00
|
|
|
sha256 = "0l9jxa393a52iiawh93v31vr1y6z2bwg6dqhpivqd6y0vip1h7qz";
|
2014-05-22 14:29:36 +01:00
|
|
|
};
|
|
|
|
|
2017-01-26 01:45:36 +00:00
|
|
|
phases = [ "installPhase" ];
|
2014-05-22 14:29:36 +01:00
|
|
|
|
2017-01-26 01:45:36 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2014-05-22 14:29:36 +01:00
|
|
|
|
2015-07-28 01:55:55 +01:00
|
|
|
sourceRoot = ".";
|
|
|
|
|
2014-05-22 14:29:36 +01:00
|
|
|
installPhase = ''
|
2017-01-26 01:45:36 +00:00
|
|
|
install -D ${src} "$out/libexec/apktool/apktool.jar"
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p "$out/bin"
|
2014-05-22 14:29:36 +01:00
|
|
|
makeWrapper "${jre}/bin/java" "$out/bin/apktool" \
|
|
|
|
--add-flags "-jar $out/libexec/apktool/apktool.jar" \
|
2017-01-26 01:45:36 +00:00
|
|
|
--prefix PATH : "${buildTools}/build-tools/25.0.1/"
|
2014-05-22 14:29:36 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A tool for reverse engineering Android apk files";
|
|
|
|
homepage = https://code.google.com/p/android-apktool/;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ offline ];
|
2017-01-26 01:45:36 +00:00
|
|
|
platforms = with platforms; unix;
|
2014-05-22 14:29:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|