depot/third_party/nixpkgs/pkgs/applications/window-managers/cagebreak/default.nix
Default email cf3f6e7a7d Project import generated by Copybara.
GitOrigin-RevId: 24eb3f87fc610f18de7076aee7c5a84ac5591e3e
2020-11-30 09:33:03 +01:00

52 lines
1.4 KiB
Nix

{ 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";
version = "1.4.4";
src = fetchFromGitHub {
owner = "project-repo";
repo = "cagebreak";
rev = version;
hash = "sha256-YmUn5H0xNC/4MBGydrEk7dy5v+s2ja4VoA1neWrQ3VY=";
};
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 ];
};
}