From 252da8a66ebcd59baca63ea2b1886e3c47b0b44a Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 31 Oct 2017 22:31:05 +0100 Subject: [PATCH] wlroots: init at 2017-10-31 In preparation for Sway 1.0 which will use wlroots instead of wlc. --- .../development/libraries/wlroots/default.nix | 35 +++++++++++++++++++ .../libraries/wlroots/libdrm.patch | 9 +++++ .../libraries/wlroots/no-werror.patch | 10 ++++++ pkgs/top-level/all-packages.nix | 1 + 4 files changed, 55 insertions(+) create mode 100644 pkgs/development/libraries/wlroots/default.nix create mode 100644 pkgs/development/libraries/wlroots/libdrm.patch create mode 100644 pkgs/development/libraries/wlroots/no-werror.patch diff --git a/pkgs/development/libraries/wlroots/default.nix b/pkgs/development/libraries/wlroots/default.nix new file mode 100644 index 000000000000..79bd8bb96659 --- /dev/null +++ b/pkgs/development/libraries/wlroots/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig +, wayland, mesa_noglu, wayland-protocols, libinput, libxkbcommon, pixman +, xcbutilwm, libX11, libcap +}: + +let pname = "wlroots"; + version = "unstable-2017-10-31"; +in stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "swaywm"; + repo = "wlroots"; + rev = "7200d643363e988edf6777c38e7f8fcd451a2c50"; + sha256 = "179raymkni1xzaph32zdhg7nfin0xfzrlnbnxkcr266k9y8k66ac"; + }; + + # TODO: Temporary workaround for compilation errors + patches = [ ./libdrm.patch ./no-werror.patch ]; + + nativeBuildInputs = [ meson ninja pkgconfig ]; + + buildInputs = [ + wayland mesa_noglu wayland-protocols libinput libxkbcommon pixman + xcbutilwm libX11 libcap + ]; + + meta = with stdenv.lib; { + description = "A modular Wayland compositor library"; + inherit (src.meta) homepage; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/pkgs/development/libraries/wlroots/libdrm.patch b/pkgs/development/libraries/wlroots/libdrm.patch new file mode 100644 index 000000000000..2b9d85382764 --- /dev/null +++ b/pkgs/development/libraries/wlroots/libdrm.patch @@ -0,0 +1,9 @@ +--- a/backend/meson.build 2017-10-31 22:08:01.112927610 +0100 ++++ b/backend/meson.build 2017-10-31 22:09:28.155264343 +0100 +@@ -43,5 +43,5 @@ + 'wlr_backend', + backend_files, + include_directories: wlr_inc, +- dependencies: [wayland_server, egl, gbm, libinput, systemd, elogind, wlr_render, wlr_protos], ++ dependencies: [wayland_server, egl, gbm, libinput, systemd, elogind, wlr_render, wlr_protos, drm], + ) diff --git a/pkgs/development/libraries/wlroots/no-werror.patch b/pkgs/development/libraries/wlroots/no-werror.patch new file mode 100644 index 000000000000..78c374d9dbb8 --- /dev/null +++ b/pkgs/development/libraries/wlroots/no-werror.patch @@ -0,0 +1,10 @@ +--- a/meson.build 2017-10-31 22:08:01.132927689 +0100 ++++ b/meson.build 2017-10-31 22:20:58.215784350 +0100 +@@ -5,7 +5,6 @@ + default_options: [ + 'c_std=c11', + 'warning_level=2', +- 'werror=true', + ], + ) + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a76c4eac651f..16da59781e73 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15072,6 +15072,7 @@ with pkgs; spectrwm = callPackage ../applications/window-managers/spectrwm { }; wlc = callPackage ../development/libraries/wlc { }; + wlroots = callPackage ../development/libraries/wlroots { }; orbment = callPackage ../applications/window-managers/orbment { }; sway = callPackage ../applications/window-managers/sway { }; swaylock = callPackage ../applications/window-managers/sway { };