forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, libGL, libX11 }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "glxinfo";
|
|
version = "8.4.0";
|
|
|
|
src = fetchurl {
|
|
url = "ftp://ftp.freedesktop.org/pub/mesa/demos/mesa-demos-${version}.tar.bz2";
|
|
sha256 = "0zgzbz55a14hz83gbmm0n9gpjnf5zadzi2kjjvkn6khql2a9rs81";
|
|
};
|
|
|
|
buildInputs = [ libX11 libGL ];
|
|
|
|
dontConfigure = true;
|
|
|
|
buildPhase = "
|
|
$CC src/xdemos/{glxinfo.c,glinfo_common.c} -o glxinfo -lGL -lX11
|
|
$CC src/xdemos/glxgears.c -o glxgears -lGL -lX11 -lm
|
|
$CC src/egl/opengles2/es2_info.c -o es2_info -lEGL -lGLESv2 -lX11
|
|
$CC src/egl/opengles2/es2gears.c src/egl/eglut/{eglut.c,eglut_x11.c} -o es2gears -Isrc/egl/eglut -lEGL -lGLESv2 -lX11 -lm
|
|
$CC src/egl/opengl/eglinfo.c -o eglinfo -lEGL -lGLESv2 -lX11
|
|
";
|
|
|
|
installPhase = "
|
|
install -Dm 555 -t $out/bin glx{info,gears} es2{_info,gears} eglinfo
|
|
";
|
|
|
|
meta = with lib; {
|
|
description = "Test utilities for OpenGL";
|
|
homepage = "https://www.mesa3d.org/";
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ abbradar ];
|
|
};
|
|
}
|