package libglvnd {
	description = "The GL Vendor-Neutral Dispatch library";
	website = "https://gitlab.freedesktop.org/glvnd/libglvnd";
	anitya = 12098;

	version# = "1.7.0";
	source = remoteGitLab {
		domain = "gitlab.freedesktop.org";
		suffix = "glvnd/libglvnd";
		ref = "v"+version;
		checksum = "eIQJK2sgFQDHdeFkQO87TrSUaZRFG4y2DrwA8Ut-sGboI59uw1OOiIVqq2AIwnGY";
	};

	exec = meson {
		setup = {
			"x11": "enabled";
			"glx": "enabled";
		};

		postCompile = `
export DISPLAY=':0'
Xvfb &
XVFB_PID="$!"
trap 'kill $XVFB_PID && wait $XVFB_PID' EXIT
`;
	};

	inputs = [
		// symbols check fail with llvm nm
		binutils,
		// test suite wants X server
		xserver,

		libXext,
	];

	runtime = [ libXext ];
}
