2021-04-12 20:14:23 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchzip
|
|
|
|
, autoPatchelfHook
|
|
|
|
, makeWrapper
|
|
|
|
, makeDesktopItem
|
|
|
|
, copyDesktopItems
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gobject-introspection
|
|
|
|
, gdk-pixbuf
|
|
|
|
, jre
|
|
|
|
, androidenv
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "agi";
|
2022-09-01 08:56:59 +02:00
|
|
|
version = "3.2.0-dev-20220831";
|
2021-04-12 20:14:23 +02:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/google/agi-dev-releases/releases/download/v${version}/agi-${version}-linux.zip";
|
2022-09-01 08:56:59 +02:00
|
|
|
sha256 = "sha256-pAPYIhNqr7TpVDnHhRVGkd6HCqu945OCXa5dpGi2UhU=";
|
2021-04-12 20:14:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
makeWrapper
|
|
|
|
wrapGAppsHook
|
|
|
|
gdk-pixbuf
|
|
|
|
gobject-introspection
|
|
|
|
copyDesktopItems
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/{bin,lib}
|
|
|
|
cp ./{agi,gapis,gapir,gapit,device-info} $out/bin
|
|
|
|
cp lib/gapic.jar $out/lib
|
|
|
|
wrapProgram $out/bin/agi \
|
|
|
|
--add-flags "--vm ${jre}/bin/java" \
|
|
|
|
--add-flags "--jar $out/lib/gapic.jar" \
|
|
|
|
--add-flags "--adb ${androidenv.androidPkgs_9_0.platform-tools}/bin/adb"
|
|
|
|
for i in 16 32 48 64 96 128 256 512 1024; do
|
|
|
|
install -D ${src}/icon.png $out/share/icons/hicolor/''${i}x$i/apps/agi.png
|
|
|
|
done
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItems = [(makeDesktopItem {
|
|
|
|
name = "agi";
|
|
|
|
desktopName = "Android GPU Inspector";
|
2022-03-09 17:11:38 +01:00
|
|
|
exec = "agi";
|
2021-04-12 20:14:23 +02:00
|
|
|
icon = "agi";
|
2022-02-22 15:56:15 +01:00
|
|
|
categories = [ "Development" "Debugger" "Graphics" "3DGraphics" ];
|
2021-04-12 20:14:23 +02:00
|
|
|
})];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/google/agi/";
|
|
|
|
description = "Android GPU Inspector";
|
2022-06-17 01:40:08 +02:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
binaryBytecode
|
|
|
|
binaryNativeCode
|
|
|
|
];
|
2021-04-12 20:14:23 +02:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = [ maintainers.ivar ];
|
|
|
|
};
|
|
|
|
}
|