diff options
author | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-05-22 15:29:36 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-22 15:43:50 +0200 |
commit | 4d634e2baea60a02b63d17f27af37e64ee3e30f2 (patch) | |
tree | 70a89042b1de74ca4f10f17e05d23a6aa16c93c3 /pkgs/development/tools/apktool/default.nix | |
parent | 58226a7b0600fbb74984f983e4adff42ddb57b68 (diff) |
Add apktool, tool for reverse engineering Android apk files
Diffstat (limited to 'pkgs/development/tools/apktool/default.nix')
-rw-r--r-- | pkgs/development/tools/apktool/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/development/tools/apktool/default.nix b/pkgs/development/tools/apktool/default.nix new file mode 100644 index 000000000000..a415ffd152d7 --- /dev/null +++ b/pkgs/development/tools/apktool/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, makeWrapper, jre, buildTools }: + +stdenv.mkDerivation rec { + name = "apktool-${version}"; + version = "1.5.2"; + + src = fetchurl { + url = "https://android-apktool.googlecode.com/files/apktool${version}.tar.bz2"; + sha1 = "2dd828cf79467730c7406aa918f1da1bd21aaec8"; + }; + + unpackCmd = '' + tar -xvf $src || true + cd apktool* + ''; + + phases = [ "unpackPhase" "installPhase" ]; + + buildInputs = [ makeWrapper ]; + + installPhase = '' + install -D apktool.jar "$out/libexec/apktool/apktool.jar" + ensureDir "$out/bin" + makeWrapper "${jre}/bin/java" "$out/bin/apktool" \ + --add-flags "-jar $out/libexec/apktool/apktool.jar" \ + --prefix PATH : "${buildTools}/build-tools/android-4.3/" + ''; + + 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 ]; + }; + +} |