-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
/
default.nix
57 lines (48 loc) · 1.54 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
{ lib, stdenv, fetchFromGitHub
, substituteAll
, meson, ninja, pkg-config, wayland-scanner, scdoc, makeWrapper
, wlroots, wayland, wayland-protocols, pixman, libxkbcommon, xcbutilwm
, systemd, libGL, libX11, mesa
, xwayland ? null
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "cage";
version = "0.1.5-unstable-2024-07-29";
src = fetchFromGitHub {
owner = "cage-kiosk";
repo = "cage";
rev = "d3fb99d6654325ec46277cfdb589f89316bed701";
hash = "sha256-WP0rWO9Wbs/09wTY8IlIUybnVUnwiNdXD9JgsoVG4rM=";
};
patches = [
# TODO: Remove on next stable release.
(substituteAll {
src = ./inject-git-commit.patch;
gitCommit = lib.substring 0 7 src.rev;
gitBranch = "master";
})
];
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [ meson ninja pkg-config wayland-scanner scdoc makeWrapper ];
buildInputs = [
wlroots wayland wayland-protocols pixman libxkbcommon xcbutilwm
mesa # for libEGL headers
systemd libGL libX11
];
postFixup = lib.optionalString wlroots.enableXWayland ''
wrapProgram $out/bin/cage --prefix PATH : "${xwayland}/bin"
'';
# Tests Cage using the NixOS module by launching xterm:
passthru.tests.basic-nixos-module-functionality = nixosTests.cage;
meta = with lib; {
description = "Wayland kiosk that runs a single, maximized application";
homepage = "https://www.hjdskes.nl/projects/cage/";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ primeos ];
mainProgram = "cage";
};
}