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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
{ lib
, stdenv
, fetchFromGitHub
, cairo
, fontconfig
, libxkbcommon
, makeWrapper
, mesa
, meson
, ninja
, nixosTests
, pango
, pixman
, pkg-config
, scdoc
, systemd
, wayland
, wayland-protocols
, withXwayland ? true , xwayland
, wlroots
}:
stdenv.mkDerivation rec {
pname = "cagebreak";
version = "1.7.1";
src = fetchFromGitHub {
owner = "project-repo";
repo = pname;
rev = version;
hash = "sha256-1IztedN5/I/4TDKHLJ26fSrDsvJ5QAr+cbzS2PQITDE=";
};
nativeBuildInputs = [
makeWrapper
meson
ninja
pkg-config
scdoc
wayland
];
buildInputs = [
cairo
fontconfig
libxkbcommon
mesa # for libEGL headers
pango
pixman
systemd
wayland
wayland-protocols
wlroots
];
outputs = [
"out"
"contrib"
];
mesonFlags = [
"-Dman-pages=true"
"-Dversion_override=${version}"
"-Dxwayland=${lib.boolToString withXwayland}"
];
# TODO: investigate why is this happening
postPatch = ''
sed -i -e 's|<drm_fourcc.h>|<libdrm/drm_fourcc.h>|' *.c
'';
postInstall = ''
install -d $contrib/share/cagebreak/
install -m644 $src/examples/config $contrib/share/cagebreak/
'';
postFixup = lib.optionalString withXwayland ''
wrapProgram $out/bin/cagebreak --prefix PATH : "${xwayland}/bin"
'';
meta = with lib; {
homepage = "https://github.com/project-repo/cagebreak";
description = "A Wayland tiling compositor inspired by ratpoison";
license = licenses.mit;
maintainers = with maintainers; [ berbiche ];
platforms = platforms.linux;
};
passthru.tests.basic = nixosTests.cagebreak;
}
|