2021-05-17 04:39:35 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, zig
|
|
|
|
, wayland
|
|
|
|
, pkg-config
|
|
|
|
, scdoc
|
|
|
|
, xwayland
|
|
|
|
, wayland-protocols
|
|
|
|
, wlroots
|
|
|
|
, libxkbcommon
|
|
|
|
, pixman
|
|
|
|
, udev
|
|
|
|
, libevdev
|
2021-06-30 04:53:05 +02:00
|
|
|
, libinput
|
2021-05-17 04:39:35 +02:00
|
|
|
, libX11
|
|
|
|
, libGL
|
2021-04-14 04:33:36 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-04-14 07:30:03 +02:00
|
|
|
pname = "river";
|
2021-11-03 08:10:42 +01:00
|
|
|
version = "0.1.0";
|
2021-04-14 04:33:36 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ifreund";
|
2021-04-29 22:01:54 +02:00
|
|
|
repo = pname;
|
2021-11-03 08:10:42 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "03pdgrcpj8db9s14249815z76dyjwwma8xv6p9hpw79flk6rk7v7";
|
2021-04-14 04:33:36 +02:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2021-05-17 04:39:35 +02:00
|
|
|
nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
wayland-protocols
|
|
|
|
wlroots
|
|
|
|
libxkbcommon
|
|
|
|
pixman
|
|
|
|
udev
|
|
|
|
libevdev
|
2021-06-30 04:53:05 +02:00
|
|
|
libinput
|
2021-05-17 04:39:35 +02:00
|
|
|
libX11
|
|
|
|
libGL
|
2021-04-14 04:33:36 +02:00
|
|
|
];
|
|
|
|
|
2021-05-09 18:32:05 +02:00
|
|
|
dontConfigure = true;
|
|
|
|
|
2021-05-01 18:18:33 +02:00
|
|
|
preBuild = ''
|
2021-04-14 07:30:03 +02:00
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
2021-05-17 04:39:35 +02:00
|
|
|
|
2021-04-14 07:30:03 +02:00
|
|
|
installPhase = ''
|
2021-05-09 18:32:05 +02:00
|
|
|
runHook preInstall
|
2021-06-01 12:53:46 +02:00
|
|
|
zig build -Drelease-safe -Dcpu=baseline -Dxwayland -Dman-pages --prefix $out install
|
2021-05-09 18:32:05 +02:00
|
|
|
runHook postInstall
|
2021-04-29 22:01:54 +02:00
|
|
|
'';
|
2021-04-14 04:33:36 +02:00
|
|
|
|
2021-05-17 04:39:35 +02: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 18:18:33 +02:00
|
|
|
installFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
2021-04-14 04:33:36 +02:00
|
|
|
meta = with lib; {
|
2021-05-01 18:18:33 +02:00
|
|
|
homepage = "https://github.com/ifreund/river";
|
2021-05-09 18:32:05 +02:00
|
|
|
description = "A dynamic tiling wayland compositor";
|
2021-04-14 04:33:36 +02:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
2021-05-16 21:29:15 +02:00
|
|
|
maintainers = with maintainers; [ fortuneteller2k ];
|
2021-04-14 04:33:36 +02:00
|
|
|
};
|
|
|
|
}
|