2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wayland
|
2020-03-10 15:33:00 +01:00
|
|
|
, libGL, wayland-protocols, libinput, libxkbcommon, pixman
|
2019-05-28 21:09:34 +02:00
|
|
|
, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa
|
2021-04-08 12:35:20 +02:00
|
|
|
, libpng, ffmpeg, libuuid, xcbutilrenderutil, xwayland
|
2017-10-31 22:31:05 +01:00
|
|
|
}:
|
|
|
|
|
2019-06-03 15:24:50 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2018-10-22 22:51:10 +02:00
|
|
|
pname = "wlroots";
|
2021-04-08 12:35:20 +02:00
|
|
|
version = "0.13.0";
|
2017-10-31 22:31:05 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swaywm";
|
|
|
|
repo = "wlroots";
|
2018-10-22 22:51:10 +02:00
|
|
|
rev = version;
|
2021-04-08 12:35:20 +02:00
|
|
|
sha256 = "01plhbnsp5yg18arz0v8fr0pr9l4w4pdzwkg9px486qdvb3s1vgy";
|
2017-10-31 22:31:05 +01:00
|
|
|
};
|
|
|
|
|
2019-08-27 11:09:43 +02:00
|
|
|
# $out for the library and $examples for the example programs (in examples):
|
|
|
|
outputs = [ "out" "examples" ];
|
2017-10-31 22:31:05 +01:00
|
|
|
|
2020-03-10 15:33:00 +01:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config wayland ];
|
2017-10-31 22:31:05 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-06-24 20:57:00 +02:00
|
|
|
libGL wayland wayland-protocols libinput libxkbcommon pixman
|
2019-05-28 21:09:34 +02:00
|
|
|
xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa
|
2021-04-08 12:35:20 +02:00
|
|
|
libpng ffmpeg libuuid xcbutilrenderutil xwayland
|
2018-10-22 22:51:10 +02:00
|
|
|
];
|
|
|
|
|
2020-11-08 16:19:21 +01:00
|
|
|
mesonFlags = [ "-Dlogind-provider=systemd" "-Dlibseat=disabled" ];
|
2020-06-24 20:57:00 +02:00
|
|
|
|
2019-02-03 17:52:53 +01:00
|
|
|
postFixup = ''
|
2018-10-22 22:51:10 +02:00
|
|
|
# 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
|
2018-10-24 23:40:20 +02:00
|
|
|
cd ./examples
|
|
|
|
for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do
|
|
|
|
cp "$binary" "$examples/bin/wlroots-$binary"
|
2018-10-22 22:51:10 +02:00
|
|
|
done
|
2017-12-23 14:02:59 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2017-10-31 22:31:05 +01:00
|
|
|
description = "A modular Wayland compositor library";
|
2020-03-10 15:33:00 +01:00
|
|
|
longDescription = ''
|
|
|
|
Pluggable, composable, unopinionated modules for building a Wayland
|
|
|
|
compositor; or about 50,000 lines of code you were going to write anyway.
|
|
|
|
'';
|
2017-10-31 22:31:05 +01:00
|
|
|
inherit (src.meta) homepage;
|
2020-03-10 15:33:00 +01:00
|
|
|
changelog = "https://github.com/swaywm/wlroots/releases/tag/${version}";
|
2017-10-31 22:31:05 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2021-04-07 22:16:06 +02:00
|
|
|
maintainers = with maintainers; [ primeos synthetica ];
|
2017-10-31 22:31:05 +01:00
|
|
|
};
|
|
|
|
}
|