2021-05-01 17:18:33 +01:00
|
|
|
{ lib, stdenv ,fetchFromGitHub
|
|
|
|
, zig, wayland, pkg-config, scdoc
|
|
|
|
, xwayland, wayland-protocols, wlroots
|
|
|
|
, libxkbcommon, pixman, udev, libevdev, libX11, libGL
|
2021-04-14 03:33:36 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-04-14 06:30:03 +01:00
|
|
|
pname = "river";
|
2021-05-09 17:32:05 +01:00
|
|
|
version = "unstable-2021-05-07";
|
2021-04-14 03:33:36 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ifreund";
|
2021-04-29 21:01:54 +01:00
|
|
|
repo = pname;
|
2021-05-09 17:32:05 +01:00
|
|
|
rev = "7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d";
|
|
|
|
sha256 = "1z5qjid73lfn654f2k74nwgvpr88fpdfpbzhihybx9cyy1mqfz7j";
|
2021-04-14 03:33:36 +01:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2021-05-09 17:32:05 +01:00
|
|
|
buildInputs = [ wayland-protocols wlroots pixman
|
2021-05-01 17:18:33 +01:00
|
|
|
libxkbcommon pixman udev libevdev libX11 libGL
|
2021-04-14 03:33:36 +01:00
|
|
|
];
|
|
|
|
|
2021-05-09 17:32:05 +01:00
|
|
|
dontConfigure = true;
|
|
|
|
|
2021-05-01 17:18:33 +01:00
|
|
|
preBuild = ''
|
2021-04-14 06:30:03 +01:00
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
2021-05-09 17:32:05 +01:00
|
|
|
runHook preInstall
|
2021-05-01 17:18:33 +01:00
|
|
|
zig build -Drelease-safe -Dxwayland -Dman-pages --prefix $out install
|
2021-05-09 17:32:05 +01:00
|
|
|
runHook postInstall
|
2021-04-29 21:01:54 +01:00
|
|
|
'';
|
2021-04-14 03:33:36 +01:00
|
|
|
|
2021-05-09 17:32:05 +01:00
|
|
|
nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
|
2021-05-01 17:18:33 +01:00
|
|
|
|
2021-05-09 17:32:05 +01:00
|
|
|
# Builder patch install dir into river to get default config
|
|
|
|
# When installFlags is removed, river becomes half broken
|
|
|
|
# see https://github.com/ifreund/river/blob/7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d/river/main.zig#L56
|
2021-05-01 17:18:33 +01:00
|
|
|
installFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
2021-04-14 03:33:36 +01:00
|
|
|
meta = with lib; {
|
2021-05-01 17:18:33 +01:00
|
|
|
homepage = "https://github.com/ifreund/river";
|
2021-05-09 17:32:05 +01:00
|
|
|
description = "A dynamic tiling wayland compositor";
|
2021-04-14 03:33:36 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
2021-05-01 17:18:33 +01:00
|
|
|
maintainers = with maintainers; [ branwright1 ];
|
2021-04-14 03:33:36 +01:00
|
|
|
};
|
|
|
|
}
|