nixpkgs/pkgs/development/tools/apktool/default.nix

35 lines
983 B
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, jre, buildTools }:
stdenv.mkDerivation rec {
name = "apktool-${version}";
2017-01-26 01:45:36 +00:00
version = "2.2.2";
src = fetchurl {
2017-01-26 01:45:36 +00:00
url = "https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_${version}.jar";
sha256 = "1a94jw0ml08xdwls1q9v5p1zak5qrbw2zyychnm5vch8znyws411";
};
2017-01-26 01:45:36 +00:00
phases = [ "installPhase" ];
2017-01-26 01:45:36 +00:00
nativeBuildInputs = [ makeWrapper ];
sourceRoot = ".";
installPhase = ''
2017-01-26 01:45:36 +00:00
install -D ${src} "$out/libexec/apktool/apktool.jar"
mkdir -p "$out/bin"
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/"
'';
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;
};
}