mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Add apktool, tool for reverse engineering Android apk files
This commit is contained in:
parent
58226a7b06
commit
4d634e2bae
2 changed files with 40 additions and 0 deletions
36
pkgs/development/tools/apktool/default.nix
Normal file
36
pkgs/development/tools/apktool/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
|
||||
}
|
|
@ -462,6 +462,10 @@ let
|
|||
|
||||
analog = callPackage ../tools/admin/analog {};
|
||||
|
||||
apktool = callPackage ../development/tools/apktool {
|
||||
buildTools = androidenv.buildTools;
|
||||
};
|
||||
|
||||
apt-offline = callPackage ../tools/misc/apt-offline { };
|
||||
|
||||
archivemount = callPackage ../tools/filesystems/archivemount { };
|
||||
|
|
Loading…
Reference in a new issue