-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
/
default.nix
74 lines (64 loc) · 1.62 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{ lib
, stdenv
, fetchFromGitHub
, zig
, wayland
, pkg-config
, scdoc
, xwayland
, wayland-protocols
, wlroots_0_16
, libxkbcommon
, pixman
, udev
, libevdev
, libinput
, libGL
, libX11
, xwaylandSupport ? true
}:
stdenv.mkDerivation rec {
pname = "river";
version = "0.2.1";
src = fetchFromGitHub {
owner = "riverwm";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-eIW8NNhacAM/7gZCUHCmiySANLenfcaCRTUkoJUZRPQ=";
fetchSubmodules = true;
};
nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
buildInputs = [
wayland-protocols
wlroots_0_16
libxkbcommon
pixman
udev
libevdev
libinput
libGL
] ++ lib.optional xwaylandSupport libX11;
dontConfigure = true;
preBuild = ''
export HOME=$TMPDIR
'';
installPhase = ''
runHook preInstall
zig build -Drelease-safe -Dcpu=baseline ${lib.optionalString xwaylandSupport "-Dxwayland"} -Dman-pages --prefix $out install
install contrib/river.desktop -Dt $out/share/wayland-sessions
runHook postInstall
'';
/* Builder patch install dir into river to get default config
When installFlags is removed, river becomes half broken.
See https://github.com/riverwm/river/blob/7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d/river/main.zig#L56
*/
installFlags = [ "DESTDIR=$(out)" ];
passthru.providedSessions = ["river"];
meta = with lib; {
homepage = "https://github.com/ifreund/river";
description = "A dynamic tiling wayland compositor";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ fortuneteller2k adamcstephens ];
};
}