Merge pull request #191395 from IvarWithoutBones/update-agi

agi: 3.2.0-dev-20220831 -> 3.0.1, switch to stable release
This commit is contained in:
Jonas Heinrich 2022-09-16 12:33:41 +02:00 committed by GitHub
commit 425598c0d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
{ lib
, stdenv
, stdenvNoCC
, fetchzip
, autoPatchelfHook
, makeWrapper
@ -9,63 +9,69 @@
, gobject-introspection
, gdk-pixbuf
, jre
, androidenv
, android-tools
}:
stdenv.mkDerivation rec {
stdenvNoCC.mkDerivation rec {
pname = "agi";
version = "3.2.0-dev-20220831";
version = "3.0.1";
src = fetchzip {
url = "https://github.com/google/agi-dev-releases/releases/download/v${version}/agi-${version}-linux.zip";
sha256 = "sha256-pAPYIhNqr7TpVDnHhRVGkd6HCqu945OCXa5dpGi2UhU=";
url = "https://github.com/google/agi/releases/download/v${version}/agi-${version}-linux.zip";
sha256 = "sha256-793lOJL1/wqETkWfiksnLY3Lmxx500fw4PIzT9ZQqQs=";
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
wrapGAppsHook
gdk-pixbuf
gobject-introspection
autoPatchelfHook
copyDesktopItems
];
buildInputs = [
stdenv.cc.cc.lib
makeWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib}
mkdir -p $out/bin
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"
cp -r lib $out
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
install -D ${src}/icon.png $out/share/icons/hicolor/$ix$i/apps/agi.png
done
runHook postInstall
'';
desktopItems = [(makeDesktopItem {
dontWrapGApps = true;
preFixup = ''
wrapProgram $out/bin/agi \
--add-flags "--vm ${jre}/bin/java" \
--add-flags "--adb ${android-tools}/bin/adb" \
--add-flags "--jar $out/lib/gapic.jar" \
"''${gappsWrapperArgs[@]-}"
'';
desktopItems = lib.toList (makeDesktopItem {
name = "agi";
desktopName = "Android GPU Inspector";
exec = "agi";
icon = "agi";
categories = [ "Development" "Debugger" "Graphics" "3DGraphics" ];
})];
});
meta = with lib; {
homepage = "https://github.com/google/agi/";
description = "Android GPU Inspector";
homepage = "https://gpuinspector.dev";
changelog = "https://github.com/google/agi/releases/tag/v${version}";
platforms = [ "x86_64-linux" ];
license = licenses.asl20;
maintainers = [ maintainers.ivar ];
sourceProvenance = with sourceTypes; [
binaryBytecode
binaryNativeCode
];
license = licenses.asl20;
platforms = [ "x86_64-linux" ];
maintainers = [ maintainers.ivar ];
};
}