2017-10-31 22:31:05 +01:00
|
|
|
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig
|
|
|
|
, wayland, mesa_noglu, wayland-protocols, libinput, libxkbcommon, pixman
|
2017-12-23 14:02:59 +01:00
|
|
|
, xcbutilwm, libX11, libcap, xcbutilimage
|
2017-10-31 22:31:05 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let pname = "wlroots";
|
2017-12-23 14:02:59 +01:00
|
|
|
version = "unstable-2017-12-22";
|
2017-10-31 22:31:05 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swaywm";
|
|
|
|
repo = "wlroots";
|
2017-12-23 14:02:59 +01:00
|
|
|
rev = "0a370c529806077a11638e7fa856d5fbb539496b";
|
|
|
|
sha256 = "0h3i0psn5595dncv53l5m2mf13k9wcv3qi16vla5ckpskykc0xx6";
|
2017-10-31 22:31:05 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# TODO: Temporary workaround for compilation errors
|
2017-12-23 14:02:59 +01:00
|
|
|
patches = [ ./libdrm.patch ]; #./no-werror.patch
|
|
|
|
|
|
|
|
# $out for the library and $bin for rootston
|
|
|
|
outputs = [ "out" "bin" ];
|
2017-10-31 22:31:05 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
wayland mesa_noglu wayland-protocols libinput libxkbcommon pixman
|
2017-12-23 14:02:59 +01:00
|
|
|
xcbutilwm libX11 libcap xcbutilimage
|
2017-10-31 22:31:05 +01:00
|
|
|
];
|
|
|
|
|
2017-12-23 14:02:59 +01:00
|
|
|
# Install rootston (the reference compositor) to $bin
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $bin/bin
|
|
|
|
cp rootston/rootston $bin/bin/
|
|
|
|
mkdir $bin/lib
|
|
|
|
cp libwlroots.so $bin/lib/
|
|
|
|
patchelf --set-rpath "$bin/lib:${stdenv.lib.makeLibraryPath buildInputs}" $bin/bin/rootston
|
2017-12-23 17:25:19 +01:00
|
|
|
mkdir $bin/etc
|
|
|
|
cp ../rootston/rootston.ini.example $bin/etc/rootston.ini
|
2017-12-23 14:02:59 +01:00
|
|
|
'';
|
|
|
|
|
2017-10-31 22:31:05 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|