@@ -0,0 +1,35 @@
1+{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig
2+, wayland, mesa_noglu, wayland-protocols, libinput, libxkbcommon, pixman
3+, xcbutilwm, libX11, libcap
4+}:
5+
6+let pname = "wlroots";
7+ version = "unstable-2017-10-31";
8+in stdenv.mkDerivation rec {
9+ name = "${pname}-${version}";
10+
11+ src = fetchFromGitHub {
12+ owner = "swaywm";
13+ repo = "wlroots";
14+ rev = "7200d643363e988edf6777c38e7f8fcd451a2c50";
15+ sha256 = "179raymkni1xzaph32zdhg7nfin0xfzrlnbnxkcr266k9y8k66ac";
16+ };
17+
18+ # TODO: Temporary workaround for compilation errors
19+ patches = [ ./libdrm.patch ./no-werror.patch ];
20+
21+ nativeBuildInputs = [ meson ninja pkgconfig ];
22+
23+ buildInputs = [
24+ wayland mesa_noglu wayland-protocols libinput libxkbcommon pixman
25+ xcbutilwm libX11 libcap
26+ ];
27+
28+ meta = with stdenv.lib; {
29+ description = "A modular Wayland compositor library";
30+ inherit (src.meta) homepage;
31+ license = licenses.mit;
32+ platforms = platforms.linux;
33+ maintainers = with maintainers; [ primeos ];
34+ };
35+}