@@ -0,0 +1,44 @@
1+{ lib, stdenv ,fetchFromGitHub
2+, zig, wayland, pkg-config, scdoc
3+, xwayland, wayland-protocols, wlroots
4+, libxkbcommon, pixman, udev, libevdev, libX11, libGL
5+}:
6+
7+stdenv.mkDerivation rec {
8+ pname = "river";
9+ version = "unstable-2021-04-08";
10+
11+ src = fetchFromGitHub {
12+ owner = "ifreund";
13+ repo = "river";
14+ rev = "9e3e92050e04320949c6cd995273c30319ebd515";
15+ sha256 = "1v8dpbadsb3c7bc84sai09dbqv5s5s5d77vs12kdkd45x0ppmk3j";
16+ fetchSubmodules = true;
17+ };
18+
19+ buildInputs = [ xwayland wayland-protocols wlroots pixman
20+ libxkbcommon pixman udev libevdev libX11 libGL
21+ ];
22+
23+ preBuild = ''
24+ export HOME=$TMPDIR
25+ '';
26+ installPhase = ''
27+ zig build -Drelease-safe -Dxwayland -Dman-pages --prefix $out install
28+ '';
29+
30+ nativeBuildInputs = [ zig wayland scdoc pkg-config ];
31+
32+ installFlags = [ "DESTDIR=$(out)" ];
33+
34+ meta = with lib; {
35+ description = "A dynamic tiling wayland compositor";
36+ longDescription = ''
37+ river is a dynamic tiling wayland compositor that takes inspiration from dwm and bspwm.
38+ '';
39+ homepage = "https://github.com/ifreund/river";
40+ license = licenses.gpl3Plus;
41+ platforms = platforms.linux;
42+ maintainers = with maintainers; [ branwright1 ];
43+ };
44+}