2020-10-11 12:50:04 +00:00
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
, meson, ninja, pkg-config, wayland, scdoc, makeWrapper
|
|
|
|
, wlroots, wayland-protocols, pixman, libxkbcommon
|
|
|
|
, cairo , pango, fontconfig, pandoc, systemd
|
|
|
|
, withXwayland ? true, xwayland
|
|
|
|
, nixosTests
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cagebreak";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "1.4.3";
|
2020-10-11 12:50:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "project-repo";
|
|
|
|
repo = "cagebreak";
|
|
|
|
rev = version;
|
2020-10-16 20:44:37 +00:00
|
|
|
hash = "sha256-iMoj++yjGK4hn3C675QntBYcsoBx0lEjjCM8fdvRJYo=";
|
2020-10-11 12:50:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config wayland scdoc makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
wlroots wayland wayland-protocols pixman libxkbcommon cairo
|
|
|
|
pango fontconfig pandoc systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
outputs = [ "out" "contrib" ];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dxwayland=${stdenv.lib.boolToString withXwayland}"
|
|
|
|
"-Dversion_override=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $contrib/share/cagebreak
|
|
|
|
cp $src/examples/config $contrib/share/cagebreak/config
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = stdenv.lib.optionalString withXwayland ''
|
|
|
|
wrapProgram $out/bin/cagebreak --prefix PATH : "${xwayland}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests.basic = nixosTests.cagebreak;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A Wayland tiling compositor inspired by ratpoison";
|
|
|
|
homepage = "https://github.com/project-repo/cagebreak";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ berbiche ];
|
|
|
|
};
|
|
|
|
}
|