mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 15:04:44 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
65 lines
1.3 KiB
Nix
65 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, makeWrapper
|
|
, meson
|
|
, ninja
|
|
, wayland-scanner
|
|
, libjpeg
|
|
, libpng
|
|
, libX11
|
|
, libGL
|
|
, libdrm
|
|
, udev
|
|
, wayland
|
|
, wayland-protocols
|
|
, mesa
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "glmark2";
|
|
version = "2023.01";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "glmark2";
|
|
repo = "glmark2";
|
|
rev = version;
|
|
sha256 = "sha256-WCvc5GqrAdpIKQ4LVqwO6ZGbzBgLCl49NxiGJynIjSQ=";
|
|
};
|
|
|
|
depsBuildBuild = [ pkg-config ];
|
|
nativeBuildInputs = [ pkg-config makeWrapper meson ninja wayland-scanner ];
|
|
buildInputs = [
|
|
libjpeg
|
|
libpng
|
|
libX11
|
|
libdrm
|
|
udev
|
|
wayland
|
|
wayland-protocols
|
|
mesa
|
|
];
|
|
|
|
mesonFlags = [ "-Dflavors=drm-gl,drm-glesv2,gbm-gl,gbm-glesv2,wayland-gl,wayland-glesv2,x11-gl,x11-gl-egl,x11-glesv2" ];
|
|
|
|
postInstall = ''
|
|
for binary in $out/bin/glmark2*; do
|
|
wrapProgram $binary \
|
|
--set LD_LIBRARY_PATH ${libGL}/lib
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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 ];
|
|
};
|
|
}
|