apktool: don't hardcode (wrong) build-tools version

This commit is contained in:
Felix C. Stegerman 2021-07-24 13:40:07 +02:00
parent f49c18e893
commit 252f4c6ed3
No known key found for this signature in database
GPG Key ID: B218FF2C27FC6CC6

View File

@ -18,13 +18,16 @@ stdenv.mkDerivation rec {
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"
'';
installPhase =
let
tools = builtins.head build-tools;
in ''
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 : "${tools}/libexec/android-sdk/build-tools/${tools.version}"
'';
meta = with lib; {
description = "A tool for reverse engineering Android apk files";