2022-01-13 20:06:32 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, meson_0_60, ninja, pkg-config, wayland-scanner
|
2021-04-26 19:14:03 +00:00
|
|
|
, libGL, wayland, wayland-protocols, libinput, libxkbcommon, pixman
|
2020-04-24 23:36:52 +00:00
|
|
|
, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa
|
2022-01-13 20:06:32 +00:00
|
|
|
, libpng, ffmpeg, xcbutilrenderutil, seatd, vulkan-loader, glslang
|
2021-10-17 09:34:42 +00:00
|
|
|
|
|
|
|
, enableXWayland ? true, xwayland ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wlroots";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "0.15.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "wlroots";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "wlroots";
|
|
|
|
rev = version;
|
2022-01-13 20:06:32 +00:00
|
|
|
sha256 = "0wdzs0wpv61pxgy3mx3xjsndyfmbj30v47d3w9ymmnd4r479n41n";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# $out for the library and $examples for the example programs (in examples):
|
|
|
|
outputs = [ "out" "examples" ];
|
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
depsBuildBuild = [ pkg-config ];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
nativeBuildInputs = [ meson_0_60 ninja pkg-config wayland-scanner ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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
|
2022-01-13 20:06:32 +00:00
|
|
|
libpng ffmpeg xcbutilrenderutil seatd vulkan-loader glslang
|
2021-10-17 09:34:42 +00:00
|
|
|
]
|
|
|
|
++ lib.optional enableXWayland xwayland
|
|
|
|
;
|
|
|
|
|
|
|
|
mesonFlags =
|
|
|
|
lib.optional (!enableXWayland) "-Dxwayland=disabled"
|
|
|
|
;
|
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;
|
2022-01-13 20:06:32 +00:00
|
|
|
changelog = "https://gitlab.freedesktop.org/wlroots/wlroots/-/tags/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|