nixos/filesystems: don't silently ignore label when device is set (#361418)
[NixPkgs.git] / pkgs / tools / misc / geekbench / 6.nix
blob6b78d65b39a1466f22b44e192de18ac1175dc2bd
1 { lib
2 , stdenv
3 , fetchurl
4 , autoPatchelfHook
5 , addDriverRunpath
6 , makeWrapper
7 , ocl-icd
8 , vulkan-loader
9 }:
11 let
12   inherit (stdenv.hostPlatform.uname) processor;
13   version = "6.3.0";
14   sources = {
15     "x86_64-linux" = {
16       url = "https://cdn.geekbench.com/Geekbench-${version}-Linux.tar.gz";
17       hash = "sha256-AXJ5mXGc1RWnIkB13KtIdt7vKETEXowunzQZciQDnzs=";
18     };
19     "aarch64-linux" = {
20       url = "https://cdn.geekbench.com/Geekbench-${version}-LinuxARMPreview.tar.gz";
21       hash = "sha256-fbf01qa9wx3k9j8AEqv38fAM3F9tZOcnpH/wa/9rawQ=";
22     };
23   };
24   geekbench_avx2 = lib.optionalString stdenv.hostPlatform.isx86_64 "geekbench_avx2";
26 stdenv.mkDerivation {
27   inherit version;
28   pname = "geekbench";
30   src = fetchurl (sources.${stdenv.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"));
32   dontConfigure = true;
33   dontBuild = true;
35   nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
37   buildInputs = [ (lib.getLib stdenv.cc.cc) ];
39   installPhase = ''
40     runHook preInstall
42     mkdir -p $out/bin
43     cp -r geekbench.plar geekbench-workload.plar geekbench6 geekbench_${processor} ${geekbench_avx2} $out/bin
45     for f in geekbench6 geekbench_${processor} ${geekbench_avx2} ; do
46       wrapProgram $out/bin/$f \
47         --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
48           addDriverRunpath.driverLink
49           ocl-icd
50           vulkan-loader
51         ]}"
52     done
54     runHook postInstall
55   '';
57   meta = with lib; {
58     description = "Cross-platform benchmark";
59     homepage = "https://geekbench.com/";
60     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
61     license = licenses.unfree;
62     maintainers = with maintainers; [ michalrus asininemonkey ];
63     platforms = builtins.attrNames sources;
64     mainProgram = "geekbench6";
65   };