1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-17 10:24:15 +00:00
nixpkgs/pkgs/development/tools/apktool/default.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, jre, build-tools }:
stdenv.mkDerivation rec {
pname = "apktool";
2019-12-08 02:30:54 +00:00
version = "2.4.1";
src = fetchurl {
2017-10-24 19:05:31 +01:00
urls = [
"https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_${version}.jar"
"https://github.com/iBotPeaches/Apktool/releases/download/v${version}/apktool_${version}.jar"
];
2019-12-08 02:30:54 +00:00
sha256 = "0ljsh8nx065isnyzzrwddypikkfhyqsww0w02cgwgh8x3lhndsxx";
};
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" \
--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 ];
2017-01-26 01:45:36 +00:00
platforms = with platforms; unix;
};
}