diff --git a/pkgs/tools/misc/geekbench/4.nix b/pkgs/tools/misc/geekbench/4.nix index d7b6152e0785..789f92babf80 100644 --- a/pkgs/tools/misc/geekbench/4.nix +++ b/pkgs/tools/misc/geekbench/4.nix @@ -1,4 +1,12 @@ -{ lib, stdenv, fetchurl, makeWrapper, ocl-icd, vulkan-loader, linuxPackages }: +{ lib +, stdenv +, fetchurl +, autoPatchelfHook +, addOpenGLRunpath +, makeWrapper +, ocl-icd +, vulkan-loader +}: stdenv.mkDerivation rec { pname = "geekbench"; @@ -12,23 +20,25 @@ stdenv.mkDerivation rec { dontConfigure = true; dontBuild = true; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; + buildInputs = [ stdenv.cc.cc ]; installPhase = '' - mkdir -p $out/bin $out/lib + runHook preInstall + + mkdir -p $out/bin cp -r geekbench.plar geekbench4 geekbench_x86_64 $out/bin - # needed for compute benchmark - ln -s ${linuxPackages.nvidia_x11}/lib/libcuda.so $out/lib/ - ln -s ${ocl-icd}/lib/libOpenCL.so $out/lib/ - ln -s ${ocl-icd}/lib/libOpenCL.so.1 $out/lib/ - ln -s ${vulkan-loader}/lib/libvulkan.so $out/lib/ - ln -s ${vulkan-loader}/lib/libvulkan.so.1 $out/lib/ - for f in geekbench4 geekbench_x86_64 ; do - patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) $out/bin/$f - wrapProgram $out/bin/$f --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}:$out/lib/" + wrapProgram $out/bin/$f \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ + addOpenGLRunpath.driverLink + ocl-icd + vulkan-loader + ]}" done + + runHook postInstall ''; meta = with lib; { @@ -38,5 +48,6 @@ stdenv.mkDerivation rec { license = licenses.unfree; maintainers = [ maintainers.michalrus ]; platforms = [ "x86_64-linux" ]; + mainProgram = "geekbench4"; }; } diff --git a/pkgs/tools/misc/geekbench/5.nix b/pkgs/tools/misc/geekbench/5.nix new file mode 100644 index 000000000000..1fc28f8c0216 --- /dev/null +++ b/pkgs/tools/misc/geekbench/5.nix @@ -0,0 +1,52 @@ +{ lib +, stdenv +, fetchurl +, autoPatchelfHook +, addOpenGLRunpath +, makeWrapper +, ocl-icd +, vulkan-loader +}: + +stdenv.mkDerivation rec { + pname = "geekbench"; + version = "5.5.1"; + + src = fetchurl { + url = "https://cdn.geekbench.com/Geekbench-${version}-Linux.tar.gz"; + sha256 = "sha256-MgN+VcPcjzYP4Wt/uxiNMTh+p1mA5I2M8CgzDjI5xAQ="; + }; + + dontConfigure = true; + dontBuild = true; + + nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp -r geekbench.plar geekbench5 geekbench_x86_64 $out/bin + + for f in geekbench5 geekbench_x86_64 ; do + wrapProgram $out/bin/$f \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ + addOpenGLRunpath.driverLink + ocl-icd + vulkan-loader + ]}" + done + + runHook postInstall + ''; + + meta = with lib; { + description = "Cross-platform benchmark"; + homepage = "https://geekbench.com/"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.unfree; + maintainers = [ maintainers.michalrus ]; + platforms = [ "x86_64-linux" ]; + mainProgram = "geekbench5"; + }; +} diff --git a/pkgs/tools/misc/geekbench/6.nix b/pkgs/tools/misc/geekbench/6.nix new file mode 100644 index 000000000000..46b1cbe71968 --- /dev/null +++ b/pkgs/tools/misc/geekbench/6.nix @@ -0,0 +1,52 @@ +{ lib +, stdenv +, fetchurl +, autoPatchelfHook +, addOpenGLRunpath +, makeWrapper +, ocl-icd +, vulkan-loader +}: + +stdenv.mkDerivation rec { + pname = "geekbench"; + version = "6.0.1"; + + src = fetchurl { + url = "https://cdn.geekbench.com/Geekbench-${version}-Linux.tar.gz"; + hash = "sha256-RrfyB7RvYWkVCbjblLIPOFcZjUR/fJHk1Em1HP74kmY="; + }; + + dontConfigure = true; + dontBuild = true; + + nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp -r geekbench.plar geekbench-workload.plar geekbench6 geekbench_x86_64 geekbench_avx2 $out/bin + + for f in geekbench6 geekbench_x86_64 geekbench_avx2 ; do + wrapProgram $out/bin/$f \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ + addOpenGLRunpath.driverLink + ocl-icd + vulkan-loader + ]}" + done + + runHook postInstall + ''; + + meta = with lib; { + description = "Cross-platform benchmark"; + homepage = "https://geekbench.com/"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.unfree; + maintainers = [ maintainers.michalrus ]; + platforms = [ "x86_64-linux" ]; + mainProgram = "geekbench6"; + }; +} diff --git a/pkgs/tools/misc/geekbench/default.nix b/pkgs/tools/misc/geekbench/default.nix deleted file mode 100644 index 77be76f2d2ed..000000000000 --- a/pkgs/tools/misc/geekbench/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, stdenv, fetchurl, makeWrapper, ocl-icd, vulkan-loader, linuxPackages }: - -stdenv.mkDerivation rec { - pname = "geekbench"; - version = "5.4.6"; - - src = fetchurl { - url = "https://cdn.geekbench.com/Geekbench-${version}-Linux.tar.gz"; - sha256 = "sha256-fCS6cSD3w2EbLL1yNfH+NKxswRUY4zyCR07gKGXW4Yc="; - }; - - dontConfigure = true; - dontBuild = true; - - nativeBuildInputs = [ makeWrapper ]; - - installPhase = '' - mkdir -p $out/bin $out/lib - cp -r geekbench.plar geekbench5 geekbench_x86_64 $out/bin - - # needed for compute benchmark - ln -s ${linuxPackages.nvidia_x11}/lib/libcuda.so $out/lib/ - ln -s ${ocl-icd}/lib/libOpenCL.so $out/lib/ - ln -s ${ocl-icd}/lib/libOpenCL.so.1 $out/lib/ - ln -s ${vulkan-loader}/lib/libvulkan.so $out/lib/ - ln -s ${vulkan-loader}/lib/libvulkan.so.1 $out/lib/ - - for f in geekbench5 geekbench_x86_64 ; do - patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) $out/bin/$f - wrapProgram $out/bin/$f --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}:$out/lib/" - done - ''; - - meta = with lib; { - description = "Cross-platform benchmark"; - homepage = "https://geekbench.com/"; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - license = licenses.unfree; - maintainers = [ maintainers.michalrus ]; - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 0e8b9bddb623..dd2c8c7735c1 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -511,6 +511,8 @@ mapAliases ({ gdal_1_11 = throw "gdal_1_11 was removed. Use gdal instead"; # Added 2021-04-03 gdb-multitarget = throw "'gdb-multitarget' has been renamed to/replaced by 'gdb'"; # Converted to throw 2022-02-22 gdk_pixbuf = throw "'gdk_pixbuf' has been renamed to/replaced by 'gdk-pixbuf'"; # Converted to throw 2022-02-22 + geekbench4 = throw "'geekbench4' has been renamed to 'geekbench_4'"; # Added 2023-03-10 + geekbench5 = throw "'geekbench5' has been renamed to 'geekbench_5'"; # Added 2023-03-10 getmail = throw "getmail has been removed from nixpkgs, migrate to getmail6"; # Added 2022-01-12 gettextWithExpat = throw "'gettextWithExpat' has been renamed to/replaced by 'gettext'"; # Converted to throw 2022-02-22 gfm = throw "gfm has been removed"; # Added 2021-01-15 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fe6b224541f1..73165c25a672 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4839,9 +4839,10 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; - geekbench4 = callPackage ../tools/misc/geekbench/4.nix { }; - geekbench5 = callPackage ../tools/misc/geekbench { }; - geekbench = geekbench5; + geekbench_4 = callPackage ../tools/misc/geekbench/4.nix { }; + geekbench_5 = callPackage ../tools/misc/geekbench/5.nix { }; + geekbench_6 = callPackage ../tools/misc/geekbench/6.nix { }; + geekbench = geekbench_6; gencfsm = callPackage ../tools/security/gencfsm { };