mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 07:05:13 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, makeWrapper
|
|
, jdk_headless
|
|
, aapt
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "apktool";
|
|
version = "2.10.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"
|
|
];
|
|
hash = "sha256-wDUKu6tTFCSN/i7gyQfe9O3RT2+u8fXTctPUq9KPBDE=";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
sourceRoot = ".";
|
|
|
|
installPhase =
|
|
''
|
|
install -D ${src} "$out/libexec/apktool/apktool.jar"
|
|
mkdir -p "$out/bin"
|
|
makeWrapper "${jdk_headless}/bin/java" "$out/bin/apktool" \
|
|
--add-flags "-jar $out/libexec/apktool/apktool.jar" \
|
|
--prefix PATH : ${lib.getBin aapt}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tool for reverse engineering Android apk files";
|
|
mainProgram = "apktool";
|
|
homepage = "https://ibotpeaches.github.io/Apktool/";
|
|
changelog = "https://github.com/iBotPeaches/Apktool/releases/tag/v${version}";
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ offline ];
|
|
platforms = with platforms; unix;
|
|
};
|
|
}
|