11 , x11Support ? true, libxcb ? null, libX11 ? null
12 , waylandSupport ? true, wayland ? null
13 , useGbm ? true, mesa ? null, libudev ? null
16 assert x11Support -> (libxcb != null && libX11 != null);
17 assert waylandSupport -> wayland != null;
18 assert useGbm -> (mesa != null && libudev != null);
19 assert with stdenv.hostPlatform; isUnix && !isDarwin -> libglvnd != null;
21 stdenv.mkDerivation rec {
25 src = fetchFromGitLab {
26 domain = "gitlab.freedesktop.org";
30 sha256 = "0s8gislmhccfa04zsj1yqk97lscbbnmxirr2zm4q3p8ybmpfhpqr";
35 ] ++ lib.optionals (with stdenv.hostPlatform; isUnix && !isDarwin) [
37 ] ++ lib.optionals x11Support [
40 ] ++ lib.optionals waylandSupport [
42 ] ++ lib.optionals useGbm [
56 wrapProgram $out/bin/wflinfo \
57 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL libglvnd ]}
61 description = "A cross-platform C library that allows one to defer selection of an OpenGL API and window system until runtime";
62 homepage = "http://www.waffle-gl.org/";
63 license = licenses.bsd2;
64 platforms = platforms.mesaPlatforms;
65 maintainers = with maintainers; [ Flakebi ];