2017-10-31 22:31:05 +01:00
|
|
|
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig
|
2018-02-24 13:06:44 +01:00
|
|
|
, wayland, libGL, wayland-protocols, libinput, libxkbcommon, pixman
|
2018-03-17 15:06:49 +01:00
|
|
|
, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors
|
2017-10-31 22:31:05 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let pname = "wlroots";
|
2018-03-17 15:06:49 +01:00
|
|
|
version = "unstable-2018-03-16";
|
2017-10-31 22:31:05 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swaywm";
|
|
|
|
repo = "wlroots";
|
2018-03-17 15:06:49 +01:00
|
|
|
rev = "9cc875429b40e2567b219f8e9ffd23316d136204";
|
|
|
|
sha256 = "1prhic3pyf9n65qfg5akzkc9qv2z3ab60dpcacr7wgr9nxrvnsdq";
|
2017-10-31 22:31:05 +01:00
|
|
|
};
|
|
|
|
|
2017-12-23 14:02:59 +01:00
|
|
|
# $out for the library and $bin for rootston
|
|
|
|
outputs = [ "out" "bin" ];
|
2017-10-31 22:31:05 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig ];
|
|
|
|
|
|
|
|
buildInputs = [
|
2018-02-24 13:06:44 +01:00
|
|
|
wayland libGL wayland-protocols libinput libxkbcommon pixman
|
2018-03-17 15:06:49 +01:00
|
|
|
xcbutilwm libX11 libcap xcbutilimage xcbutilerrors
|
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
|
2018-03-17 15:06:49 +01:00
|
|
|
cp libwlroots* $bin/lib/
|
2017-12-23 14:02:59 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|