2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2020-10-06 03:18:44 +01:00
|
|
|
, 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";
|
2021-03-10 23:27:42 +00:00
|
|
|
version = "1.6.0";
|
2020-10-06 03:18:44 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "project-repo";
|
|
|
|
repo = "cagebreak";
|
|
|
|
rev = version;
|
2021-03-10 23:27:42 +00:00
|
|
|
hash = "sha256-F7fqDVbJS6pVgmj6C1/l9PAaz5yzcYpaq6oc6a6v/Qk=";
|
2020-10-06 03:18:44 +01: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 = [
|
2021-01-15 13:21:58 +00:00
|
|
|
"-Dxwayland=${lib.boolToString withXwayland}"
|
2020-10-06 03:18:44 +01:00
|
|
|
"-Dversion_override=${version}"
|
2021-03-10 23:27:42 +00:00
|
|
|
"-Dman-pages=true"
|
2020-10-06 03:18:44 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $contrib/share/cagebreak
|
|
|
|
cp $src/examples/config $contrib/share/cagebreak/config
|
|
|
|
'';
|
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
postFixup = lib.optionalString withXwayland ''
|
2020-10-06 03:18:44 +01:00
|
|
|
wrapProgram $out/bin/cagebreak --prefix PATH : "${xwayland}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests.basic = nixosTests.cagebreak;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-06 03:18:44 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|