-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
/
default.nix
34 lines (27 loc) · 970 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchurl, makeWrapper }:
stdenv.mkDerivation rec {
name = "geekbench-${version}";
version = "4.3.3";
src = fetchurl {
url = "https://cdn.geekbench.com/Geekbench-${version}-Linux.tar.gz";
sha256 = "0bqa0k4cf4w8gjs49lnrvns11jv21kqcgdbqp2zhwqgmkx9gr8ny";
};
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp -r geekbench.plar geekbench4 geekbench_x86_64 $out/bin
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 : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib ]}"
done
'';
meta = with stdenv.lib; {
description = "Cross-platform benchmark";
homepage = https://geekbench.com/;
license = licenses.unfree;
maintainers = [ maintainers.michalrus ];
platforms = [ "x86_64-linux" ];
};
}