3
0
Fork 0
forked from mirrors/nixpkgs

agi: init at 1.1.0-dev-20210413

This commit is contained in:
IvarWithoutBones 2021-04-12 20:14:23 +02:00
parent 2be7176ab3
commit 94cb97abee
2 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,69 @@
{ lib
, stdenv
, fetchzip
, autoPatchelfHook
, makeWrapper
, makeDesktopItem
, copyDesktopItems
, wrapGAppsHook
, gobject-introspection
, gdk-pixbuf
, jre
, androidenv
}:
stdenv.mkDerivation rec {
pname = "agi";
version = "1.1.0-dev-20210413";
src = fetchzip {
url = "https://github.com/google/agi-dev-releases/releases/download/v${version}/agi-${version}-linux.zip";
sha256 = "13i6n95d0cjrhx68qsich6xzk5f9ga0y3m19k4z2d58s164rnh0v";
};
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";
exec = "$out/bin/agi";
icon = "agi";
type = "Application";
categories = "Development;Debugger;Graphics;3DGraphics";
terminal = "false";
})];
meta = with lib; {
homepage = "https://github.com/google/agi/";
description = "Android GPU Inspector";
license = licenses.asl20;
platforms = [ "x86_64-linux" ];
maintainers = [ maintainers.ivar ];
};
}

View file

@ -749,6 +749,8 @@ in
agda-pkg = callPackage ../development/tools/agda-pkg { };
agi = callPackage ../tools/graphics/agi { };
agrep = callPackage ../tools/text/agrep { };
aha = callPackage ../tools/text/aha { };