3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/wlroots/default.nix
Fabian Möller 320d6e3800
wlroots: fix build
add missing header that changed in mesa-19.2.2
2019-11-23 18:13:17 +01:00

69 lines
2 KiB
Nix

{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, fetchpatch
, wayland, libGL, wayland-protocols, libinput, libxkbcommon, pixman
, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa
, libpng, ffmpeg_4, freerdp
}:
stdenv.mkDerivation rec {
pname = "wlroots";
version = "0.8.1";
src = fetchFromGitHub {
owner = "swaywm";
repo = "wlroots";
rev = version;
sha256 = "1ak86kx617c81dy85wg9rldy1z3n8ch93cjc05a4j6sifv0nkyfm";
};
patches = [
# add missing header that changed in mesa-19.2.2
# https://github.com/swaywm/wlroots/issues/1862
(fetchpatch {
url = "https://github.com/swaywm/wlroots/commit/d113e48a2a32542fe6e12f1759f07888364609bf.diff";
sha256 = "1h09j1gmnzlz4py92a92chgy8xzsd8h8xn5irq9s2hq4cla66h87";
})
];
# $out for the library and $examples for the example programs (in examples):
outputs = [ "out" "examples" ];
nativeBuildInputs = [ meson ninja pkgconfig ];
buildInputs = [
wayland libGL wayland-protocols libinput libxkbcommon pixman
xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa
libpng ffmpeg_4 freerdp
];
mesonFlags = [
"-Dlibcap=enabled" "-Dlogind=enabled" "-Dxwayland=enabled" "-Dx11-backend=enabled"
"-Dxcb-icccm=enabled" "-Dxcb-errors=enabled"
];
postInstall = ''
# Copy the library to $examples
mkdir -p $examples/lib
cp -P libwlroots* $examples/lib/
'';
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
'';
meta = with stdenv.lib; {
description = "A modular Wayland compositor library";
inherit (src.meta) homepage;
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ primeos ];
};
}