2021-04-26 19:14:03 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wayland-scanner
|
|
|
|
, libGL, wayland, wayland-protocols, libinput, libxkbcommon, pixman
|
2020-04-24 23:36:52 +00:00
|
|
|
, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa
|
2021-06-28 23:13:55 +00:00
|
|
|
, libpng, ffmpeg, xcbutilrenderutil, xwayland, seatd
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wlroots";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "0.14.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swaywm";
|
|
|
|
repo = "wlroots";
|
|
|
|
rev = version;
|
2021-07-14 22:03:04 +00:00
|
|
|
sha256 = "1sshp3lvlkl1i670kxhwsb4xzxl8raz6769kqvgmxzcb63ns9ay1";
|
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 ];
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
nativeBuildInputs = [ meson 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
|
2021-06-28 23:13:55 +00:00
|
|
|
libpng ffmpeg xcbutilrenderutil xwayland seatd
|
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
|
|
|
};
|
|
|
|
}
|