3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/window-managers/cage/default.nix
Michael Weiss 203c8edcda
wlroots: 0.13.0 -> 0.14.0
The new release comes with breaking changes so we temporarily introduce
wlroots_0_13 for packages that don't yet support wlroots 0.14.
For the rest of the packages the required upstream patches for this new
wlroots release are fetched (if feasible).
2021-06-24 22:15:17 +02:00

50 lines
1.3 KiB
Nix

{ lib, stdenv, fetchFromGitHub
, meson, ninja, pkg-config, wayland, scdoc, makeWrapper
, wlroots, wayland-protocols, pixman, libxkbcommon
, systemd, libGL, libX11, mesa
, xwayland ? null
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "cage";
version = "0.1.3";
src = fetchFromGitHub {
owner = "Hjdskes";
repo = "cage";
rev = "v${version}";
sha256 = "0ixl45g0m8b75gvbjm3gf5qg0yplspgs0xpm2619wn5sygc47sb1";
};
patches = [
# To fix the build with wlroots 0.14.0:
./wlroots-0_14.patch
];
nativeBuildInputs = [ meson ninja pkg-config wayland scdoc makeWrapper ];
buildInputs = [
wlroots wayland wayland-protocols pixman libxkbcommon
mesa # for libEGL headers
systemd libGL libX11
];
mesonFlags = [ "-Dxwayland=${lib.boolToString (xwayland != null)}" ];
postFixup = lib.optionalString (xwayland != null) ''
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 = "A 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 ];
};
}