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

38 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, jre, buildTools }:
stdenv.mkDerivation rec {
name = "apktool-${version}";
version = "2.3.3";
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"
];
sha256 = "1wjpn1wxg8fid2mch5ili35xqvasa3pk8h1xaiygw5idpxh3cm0f";
};
2017-01-26 02:45:36 +01:00
phases = [ "installPhase" ];
2017-01-26 02:45:36 +01:00
nativeBuildInputs = [ makeWrapper ];
sourceRoot = ".";
installPhase = ''
2017-01-26 02:45:36 +01: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 02:45:36 +01:00
--prefix PATH : "${buildTools}/build-tools/25.0.1/"
'';
meta = with stdenv.lib; {
description = "A tool for reverse engineering Android apk files";
2017-10-24 20:05:31 +02:00
homepage = https://ibotpeaches.github.io/Apktool/;
license = licenses.asl20;
maintainers = with maintainers; [ offline ];
2017-01-26 02:45:36 +01:00
platforms = with platforms; unix;
};
}