2019-06-16 20:59:06 +01:00
|
|
|
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig
|
2018-02-24 12:06:44 +00:00
|
|
|
, wayland, libGL, wayland-protocols, libinput, libxkbcommon, pixman
|
2019-05-28 20:09:34 +01:00
|
|
|
, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa
|
2019-06-24 16:06:05 +01:00
|
|
|
, libpng, ffmpeg_4, freerdp
|
2017-10-31 21:31:05 +00:00
|
|
|
}:
|
|
|
|
|
2019-06-03 14:24:50 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-10-22 21:51:10 +01:00
|
|
|
pname = "wlroots";
|
2019-10-07 22:15:20 +01:00
|
|
|
version = "0.8.1";
|
2017-10-31 21:31:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swaywm";
|
|
|
|
repo = "wlroots";
|
2018-10-22 21:51:10 +01:00
|
|
|
rev = version;
|
2019-10-07 22:15:20 +01:00
|
|
|
sha256 = "1ak86kx617c81dy85wg9rldy1z3n8ch93cjc05a4j6sifv0nkyfm";
|
2017-10-31 21:31:05 +00:00
|
|
|
};
|
|
|
|
|
2019-08-27 10:09:43 +01:00
|
|
|
# $out for the library and $examples for the example programs (in examples):
|
|
|
|
outputs = [ "out" "examples" ];
|
2017-10-31 21:31:05 +00:00
|
|
|
|
2018-12-22 16:25:56 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig ];
|
2017-10-31 21:31:05 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2018-02-24 12:06:44 +00:00
|
|
|
wayland libGL wayland-protocols libinput libxkbcommon pixman
|
2019-05-28 20:09:34 +01:00
|
|
|
xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa
|
2019-06-24 16:06:05 +01:00
|
|
|
libpng ffmpeg_4 freerdp
|
2018-10-22 21:51:10 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dlibcap=enabled" "-Dlogind=enabled" "-Dxwayland=enabled" "-Dx11-backend=enabled"
|
2018-11-30 13:23:33 +00:00
|
|
|
"-Dxcb-icccm=enabled" "-Dxcb-errors=enabled"
|
2017-10-31 21:31:05 +00:00
|
|
|
];
|
|
|
|
|
2017-12-23 13:02:59 +00:00
|
|
|
postInstall = ''
|
2019-08-27 10:09:43 +01:00
|
|
|
# Copy the library to $examples
|
|
|
|
mkdir -p $examples/lib
|
|
|
|
cp -P libwlroots* $examples/lib/
|
2019-02-03 16:52:53 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2018-10-22 21:51:10 +01: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 22:40:20 +01: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 21:51:10 +01:00
|
|
|
done
|
2017-12-23 13:02:59 +00:00
|
|
|
'';
|
|
|
|
|
2017-10-31 21:31:05 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A modular Wayland compositor library";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ primeos ];
|
|
|
|
};
|
|
|
|
}
|