1 { lib, stdenv, fetchurl, makeWrapper, ocl-icd, vulkan-loader, linuxPackages }:
3 stdenv.mkDerivation rec {
8 url = "https://cdn.geekbench.com/Geekbench-${version}-Linux.tar.gz";
9 sha256 = "sha256-JA9bvRb8u0qG6ZsQR9qJ3yaV9ni/MkdWo9xRtmPp92I=";
15 nativeBuildInputs = [ makeWrapper ];
18 mkdir -p $out/bin $out/lib
19 cp -r geekbench.plar geekbench5 geekbench_x86_64 $out/bin
21 # needed for compute benchmark
22 ln -s ${linuxPackages.nvidia_x11}/lib/libcuda.so $out/lib/
23 ln -s ${ocl-icd}/lib/libOpenCL.so $out/lib/
24 ln -s ${ocl-icd}/lib/libOpenCL.so.1 $out/lib/
25 ln -s ${vulkan-loader}/lib/libvulkan.so $out/lib/
26 ln -s ${vulkan-loader}/lib/libvulkan.so.1 $out/lib/
28 for f in geekbench5 geekbench_x86_64 ; do
29 patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) $out/bin/$f
30 wrapProgram $out/bin/$f --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}:$out/lib/"
35 description = "Cross-platform benchmark";
36 homepage = "https://geekbench.com/";
37 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
38 license = licenses.unfree;
39 maintainers = [ maintainers.michalrus ];
40 platforms = [ "x86_64-linux" ];