1{stdenv, fetchFromGitHub, autoreconfHook, python2, pkgconfig, libGL_driver, libX11, libXext, glproto }:
2
3# Git version is needed for EGL and GLES handling.
4
5stdenv.mkDerivation rec {
6 name = "libglvnd-2016-12-22";
7
8 src = fetchFromGitHub {
9 owner = "NVIDIA";
10 repo = "libglvnd";
11 rev = "dc16f8c337703ad141f83583a4004fcf42e07766";
12 sha256 = "1dbwf1216np77xf1kx3ci3y7hfa1p4vgrrzg71gw36hqxf36vg5f";
13 };
14
15 nativeBuildInputs = [ autoreconfHook pkgconfig python2 ];
16 buildInputs = [ libX11 libXext glproto ];
17
18 NIX_CFLAGS_COMPILE = [
19 "-UDEFAULT_EGL_VENDOR_CONFIG_DIRS"
20 "-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"${libGL_driver.driverLink}/share/glvnd/egl_vendor.d\""
21 ];
22
23 outputs = [ "out" "dev" ];
24
25 meta = with stdenv.lib; {
26 description = "The GL Vendor-Neutral Dispatch library";
27 homepage = https://github.com/NVIDIA/libglvnd;
28 license = licenses.bsd2;
29 platforms = platforms.linux;
30 };
31}