geekbench_5: add support for aarch64-linux

This commit is contained in:
Thiago Kenji Okada 2023-09-28 10:19:10 +01:00
parent c6f7654c08
commit 2a989fea10

View file

@ -8,14 +8,25 @@
, vulkan-loader
}:
stdenv.mkDerivation rec {
pname = "geekbench";
let
inherit (stdenv.hostPlatform.uname) processor;
version = "5.5.1";
src = fetchurl {
url = "https://cdn.geekbench.com/Geekbench-${version}-Linux.tar.gz";
sha256 = "sha256-MgN+VcPcjzYP4Wt/uxiNMTh+p1mA5I2M8CgzDjI5xAQ=";
sources = {
"x86_64-linux" = {
url = "https://cdn.geekbench.com/Geekbench-${version}-Linux.tar.gz";
hash = "sha256-MgN+VcPcjzYP4Wt/uxiNMTh+p1mA5I2M8CgzDjI5xAQ=";
};
"aarch64-linux" = {
url = "https://cdn.geekbench.com/Geekbench-${version}-LinuxARMPreview.tar.gz";
hash = "sha256-nrPKnsMqvw6+HGQAKxkQi/6lPEEca1VrDCaJUUuMvW8=";
};
};
in
stdenv.mkDerivation {
inherit version;
pname = "geekbench";
src = fetchurl (sources.${stdenv.system});
dontConfigure = true;
dontBuild = true;
@ -28,9 +39,9 @@ stdenv.mkDerivation rec {
runHook preInstall
mkdir -p $out/bin
cp -r geekbench.plar geekbench5 geekbench_x86_64 $out/bin
cp -r geekbench.plar geekbench5 geekbench_${processor} $out/bin
for f in geekbench5 geekbench_x86_64 ; do
for f in geekbench5 geekbench_${processor} ; do
wrapProgram $out/bin/$f \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
addOpenGLRunpath.driverLink
@ -48,7 +59,7 @@ stdenv.mkDerivation rec {
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = [ maintainers.michalrus ];
platforms = [ "x86_64-linux" ];
platforms = builtins.attrNames sources;
mainProgram = "geekbench5";
};
}