2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wayland
|
2020-04-24 23:36:52 +00:00
|
|
|
, libGL, wayland-protocols, libinput, libxkbcommon, pixman
|
|
|
|
, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa
|
2021-04-08 16:26:57 +00:00
|
|
|
, libpng, ffmpeg, libuuid, xcbutilrenderutil, xwayland
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wlroots";
|
2021-04-08 16:26:57 +00:00
|
|
|
version = "0.13.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swaywm";
|
|
|
|
repo = "wlroots";
|
|
|
|
rev = version;
|
2021-04-08 16:26:57 +00:00
|
|
|
sha256 = "01plhbnsp5yg18arz0v8fr0pr9l4w4pdzwkg9px486qdvb3s1vgy";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# $out for the library and $examples for the example programs (in examples):
|
|
|
|
outputs = [ "out" "examples" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config wayland ];
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-07-18 16:06:22 +00:00
|
|
|
libGL wayland wayland-protocols libinput libxkbcommon pixman
|
2020-04-24 23:36:52 +00:00
|
|
|
xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa
|
2021-04-08 16:26:57 +00:00
|
|
|
libpng ffmpeg libuuid xcbutilrenderutil xwayland
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-11-09 15:59:12 +00:00
|
|
|
mesonFlags = [ "-Dlogind-provider=systemd" "-Dlibseat=disabled" ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postFixup = ''
|
|
|
|
# Install ALL example programs to $examples:
|
|
|
|
# screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle
|
|
|
|
# screenshot output-layout multi-pointer rotation tablet touch pointer
|
|
|
|
# simple
|
|
|
|
mkdir -p $examples/bin
|
|
|
|
cd ./examples
|
|
|
|
for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do
|
|
|
|
cp "$binary" "$examples/bin/wlroots-$binary"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A modular Wayland compositor library";
|
|
|
|
longDescription = ''
|
|
|
|
Pluggable, composable, unopinionated modules for building a Wayland
|
|
|
|
compositor; or about 50,000 lines of code you were going to write anyway.
|
|
|
|
'';
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
changelog = "https://github.com/swaywm/wlroots/releases/tag/${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2021-04-08 16:26:57 +00:00
|
|
|
maintainers = with maintainers; [ primeos synthetica ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|