aapt: init at 8.0.2-9289358

This commit is contained in:
linsui 2023-07-23 20:39:40 +08:00
parent 821c72743c
commit a660f5bcb5
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,48 @@
{ lib
, stdenvNoCC
, fetchzip
, autoPatchelfHook
, libcxx
}:
stdenvNoCC.mkDerivation rec {
pname = "aapt";
version = "8.0.2-9289358";
src =
let
urlAndHash =
if stdenvNoCC.isLinux then {
url = "https://dl.google.com/android/maven2/com/android/tools/build/aapt2/${version}/aapt2-${version}-linux.jar";
hash = "sha256-P8eVIS6zaZGPh4Z7SXUiLtZaX1YIsSmGOdvF6Xb1WHI=";
} else if stdenvNoCC.isDarwin then {
url = "https://dl.google.com/android/maven2/com/android/tools/build/aapt2/${version}/aapt2-${version}-osx.jar";
hash = "sha256-hDfEPk3IJt+8FbRVEiHQbn24vsuOe6m36UcQsT6tGsQ=";
} else throw "Unsupport platform: ${stdenvNoCC.system}";
in
fetchzip (urlAndHash // {
extension = "zip";
stripRoot = false;
});
nativeBuildInputs = lib.optionals stdenvNoCC.isLinux [ autoPatchelfHook ];
buildInputs = lib.optionals stdenvNoCC.isLinux [ libcxx ];
installPhase = ''
runHook preInstall
install -D aapt2 $out/bin/aapt2
runHook postInstall
'';
meta = {
description = "A build tool that compiles and packages Android app's resources";
homepage = "https://developer.android.com/tools/aapt2";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ linsui ];
platforms = lib.platforms.unix;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}

View File

@ -39811,6 +39811,8 @@ with pkgs;
aaphoto = callPackage ../tools/graphics/aaphoto { };
aapt = callPackage ../development/tools/aapt { };
flam3 = callPackage ../tools/graphics/flam3 { };
glee = callPackage ../tools/graphics/glee { };