mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ stdenv, fetchurl, makeWrapper, jre, buildTools }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "apktool-${version}";
|
|
version = "2.3.0";
|
|
|
|
src = fetchurl {
|
|
urls = [
|
|
"https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_${version}.jar"
|
|
"https://github.com/iBotPeaches/Apktool/releases/download/v${version}/apktool_${version}.jar"
|
|
];
|
|
sha256 = "b724c158ec99dbad723024e259fd73e5135c40d652a3c599cec6ade9264a568e";
|
|
};
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
sourceRoot = ".";
|
|
|
|
installPhase = ''
|
|
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" \
|
|
--prefix PATH : "${buildTools}/build-tools/25.0.1/"
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "A tool for reverse engineering Android apk files";
|
|
homepage = https://ibotpeaches.github.io/Apktool/;
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ offline ];
|
|
platforms = with platforms; unix;
|
|
};
|
|
|
|
}
|