nixpkgs/pkgs/tools/misc/geekbench/5.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchurl
, autoPatchelfHook
, addOpenGLRunpath
, makeWrapper
, ocl-icd
, vulkan-loader
}:
2017-08-07 23:28:12 +00:00
let
inherit (stdenv.hostPlatform.uname) processor;
2023-03-10 17:39:43 +00:00
version = "5.5.1";
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=";
};
2017-08-07 23:28:12 +00:00
};
in
stdenv.mkDerivation {
inherit version;
pname = "geekbench";
src = fetchurl (sources.${stdenv.system});
2017-08-07 23:28:12 +00:00
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
2017-08-07 23:28:12 +00:00
buildInputs = [ stdenv.cc.cc.lib ];
2017-08-07 23:28:12 +00:00
installPhase = ''
runHook preInstall
2017-08-07 23:28:12 +00:00
mkdir -p $out/bin
cp -r geekbench.plar geekbench5 geekbench_${processor} $out/bin
for f in geekbench5 geekbench_${processor} ; do
wrapProgram $out/bin/$f \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
addOpenGLRunpath.driverLink
ocl-icd
vulkan-loader
]}"
2017-08-07 23:28:12 +00:00
done
runHook postInstall
2017-08-07 23:28:12 +00:00
'';
meta = with lib; {
2017-08-07 23:28:12 +00:00
description = "Cross-platform benchmark";
2020-04-09 18:03:05 +00:00
homepage = "https://geekbench.com/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2017-08-07 23:28:12 +00:00
license = licenses.unfree;
maintainers = [ maintainers.michalrus ];
platforms = builtins.attrNames sources;
2023-03-10 21:19:22 +00:00
mainProgram = "geekbench5";
2017-08-07 23:28:12 +00:00
};
}