nixpkgs-suyu/pkgs/applications/window-managers/cage/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
, meson, ninja, pkg-config, wayland-scanner, scdoc, makeWrapper
, wlroots, wayland, wayland-protocols, pixman, libxkbcommon
2021-04-09 10:46:14 +02:00
, systemd, libGL, libX11, mesa
2019-08-28 22:46:51 +02:00
, xwayland ? null
2020-07-17 15:21:44 +02:00
, nixosTests
2019-08-28 22:46:51 +02:00
}:
stdenv.mkDerivation rec {
2020-07-17 15:21:44 +02:00
pname = "cage";
2021-06-26 09:56:21 +02:00
version = "0.1.4";
2019-08-28 22:46:51 +02:00
src = fetchFromGitHub {
owner = "Hjdskes";
2020-01-22 21:15:24 +01:00
repo = "cage";
2020-07-17 15:21:44 +02:00
rev = "v${version}";
2021-06-26 09:56:21 +02:00
sha256 = "0vm96gxinhy48m3x9p1sfldyd03w3gk6iflb7n9kn06j1vqyswr6";
2019-08-28 22:46:51 +02:00
};
2022-08-13 23:45:15 +02:00
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [ meson ninja pkg-config wayland-scanner scdoc makeWrapper ];
2019-08-28 22:46:51 +02:00
buildInputs = [
wlroots wayland wayland-protocols pixman libxkbcommon
2021-04-09 10:46:14 +02:00
mesa # for libEGL headers
systemd libGL libX11
2019-08-28 22:46:51 +02:00
];
2021-01-15 14:21:58 +01:00
mesonFlags = [ "-Dxwayland=${lib.boolToString (xwayland != null)}" ];
2019-08-28 22:46:51 +02:00
2021-01-15 14:21:58 +01:00
postFixup = lib.optionalString (xwayland != null) ''
2019-08-28 22:46:51 +02:00
wrapProgram $out/bin/cage --prefix PATH : "${xwayland}/bin"
'';
2020-07-17 15:21:44 +02:00
# Tests Cage using the NixOS module by launching xterm:
passthru.tests.basic-nixos-module-functionality = nixosTests.cage;
meta = with lib; {
2020-07-17 15:21:44 +02:00
description = "A Wayland kiosk that runs a single, maximized application";
homepage = "https://www.hjdskes.nl/projects/cage/";
2019-08-28 22:46:51 +02:00
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ primeos ];
};
}