nixpkgs-suyu/pkgs/development/tools/apktool/default.nix
R. RyanTM 4180682027 apktool: 2.3.4 -> 2.4.0 (#57203)
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/apktool/versions
2019-04-07 09:38:50 +00:00

37 lines
1.1 KiB
Nix

{ stdenv, fetchurl, makeWrapper, jre, build-tools }:
stdenv.mkDerivation rec {
name = "apktool-${version}";
version = "2.4.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 = "1hdwgsw3ggmdzv523wq037kjxhxqp1xq8n8m1qb22vvdj7l1dwd0";
};
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 : "${builtins.head build-tools}/libexec/android-sdk/build-tools/28.0.3"
'';
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;
};
}