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

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

54 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchurl
, autoPatchelfHook
, addDriverRunpath
, makeWrapper
, ocl-icd
, vulkan-loader
}:
2022-04-05 15:27:20 +00:00
stdenv.mkDerivation rec {
pname = "geekbench";
version = "4.4.4";
src = fetchurl {
url = "https://cdn.geekbench.com/Geekbench-${version}-Linux.tar.gz";
sha256 = "sha256-KVsBE0ueWewmoVY/vzxX2sKhRTzityPNR+wmTwZBWiI=";
};
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
buildInputs = [ stdenv.cc.cc ];
2022-04-05 15:27:20 +00:00
installPhase = ''
runHook preInstall
2022-04-05 15:27:20 +00:00
mkdir -p $out/bin
cp -r geekbench.plar geekbench4 geekbench_x86_64 $out/bin
2022-04-05 15:27:20 +00:00
for f in geekbench4 geekbench_x86_64 ; do
wrapProgram $out/bin/$f \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
addDriverRunpath.driverLink
ocl-icd
vulkan-loader
]}"
2022-04-05 15:27:20 +00:00
done
runHook postInstall
2022-04-05 15:27:20 +00:00
'';
meta = with lib; {
description = "Cross-platform benchmark";
homepage = "https://geekbench.com/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2022-04-05 15:27:20 +00:00
license = licenses.unfree;
maintainers = [ maintainers.michalrus ];
platforms = [ "x86_64-linux" ];
2023-03-10 21:19:06 +00:00
mainProgram = "geekbench4";
2022-04-05 15:27:20 +00:00
};
}