2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, makeWrapper
|
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, xorg
|
|
|
|
, libX11
|
|
|
|
, libGL
|
|
|
|
, libdrm
|
|
|
|
, udev
|
|
|
|
, python3
|
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
|
|
|
, mesa
|
|
|
|
, wafHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "glmark2";
|
2022-01-03 16:56:52 +00:00
|
|
|
version = "2021.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "glmark2";
|
|
|
|
repo = "glmark2";
|
2021-06-28 23:13:55 +00:00
|
|
|
rev = version;
|
2022-01-03 16:56:52 +00:00
|
|
|
sha256 = "sha256-S6KkazkG+kdx02MPwrYvCFWSOtM6t5xT0OTE9PLCzas=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
nativeBuildInputs = [ pkg-config wafHook makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
libjpeg
|
|
|
|
libpng
|
|
|
|
xorg.libxcb
|
|
|
|
libX11
|
|
|
|
libdrm
|
|
|
|
python3
|
|
|
|
udev
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
|
|
|
mesa
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
wafConfigureFlags = [ "--with-flavors=x11-gl,x11-glesv2,drm-gl,drm-glesv2,wayland-gl,wayland-glesv2" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for binary in $out/bin/glmark2*; do
|
|
|
|
wrapProgram $binary \
|
|
|
|
--set LD_LIBRARY_PATH ${libGL}/lib
|
|
|
|
done
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "OpenGL (ES) 2.0 benchmark";
|
|
|
|
homepage = "https://github.com/glmark2/glmark2";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
longDescription = ''
|
|
|
|
glmark2 is a benchmark for OpenGL (ES) 2.0. It uses only the subset of
|
|
|
|
the OpenGL 2.0 API that is compatible with OpenGL ES 2.0.
|
|
|
|
'';
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.wmertens ];
|
|
|
|
};
|
|
|
|
}
|