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