From f583dfef0dc8ebf2a5ca32b7985ab31287fbf48a Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Tue, 28 Nov 2023 10:47:09 +0100 Subject: [PATCH] . --- packages/hyprland-meson-build.patch | 59 ----------------------------- packages/hyprland.scm | 58 ++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 59 deletions(-) delete mode 100644 packages/hyprland-meson-build.patch diff --git a/packages/hyprland-meson-build.patch b/packages/hyprland-meson-build.patch deleted file mode 100644 index 844eaca..0000000 --- a/packages/hyprland-meson-build.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/meson.build b/meson.build -index 1d2c7f9f..c5ef4e67 100644 ---- a/meson.build -+++ b/meson.build -@@ -33,20 +33,7 @@ if cpp_compiler.check_header('execinfo.h') - add_project_arguments('-DHAS_EXECINFO', language: 'cpp') - endif - --wlroots = subproject('wlroots', default_options: ['examples=false', 'renderers=gles2']) --have_xwlr = wlroots.get_variable('features').get('xwayland') --xcb_dep = dependency('xcb', required: get_option('xwayland')) -- --cmake = import('cmake') --udis = cmake.subproject('udis86') --udis86 = udis.dependency('libudis86') -- --if get_option('xwayland').enabled() and not have_xwlr -- error('Cannot enable Xwayland in Hyprland: wlroots has been built without Xwayland support') --endif --have_xwayland = xcb_dep.found() and have_xwlr -- --if not have_xwayland -+if get_option('xwayland').disabled() - add_project_arguments('-DNO_XWAYLAND', language: 'cpp') - endif - -@@ -69,8 +56,6 @@ if get_option('buildtype') == 'debug' - add_project_arguments('-DHYPRLAND_DEBUG', language: 'cpp') - endif - --version_h = run_command('sh', '-c', 'scripts/generateVersion.sh') -- - globber = run_command('find', 'src', '-name', '*.h*', check: true) - headers = globber.stdout().strip().split('\n') - foreach file : headers -diff --git a/src/meson.build b/src/meson.build -index 0af864b9..38723b8c 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -9,16 +9,16 @@ executable('Hyprland', src, - server_protos, - dependency('wayland-server'), - dependency('wayland-client'), -- wlroots.get_variable('wlroots'), -+ dependency('wlroots'), - dependency('cairo'), - dependency('libdrm'), - dependency('egl'), - dependency('xkbcommon'), - dependency('libinput'), -- xcb_dep, -+ dependency('xcb', required: get_option('xwayland')), - backtrace_dep, - systemd_dep, -- udis86, -+ dependency('udis86'), - - dependency('pixman-1'), - dependency('gl', 'opengl'), diff --git a/packages/hyprland.scm b/packages/hyprland.scm index f858e4b..40ece8a 100644 --- a/packages/hyprland.scm +++ b/packages/hyprland.scm @@ -27,6 +27,64 @@ #:use-module (gnu packages wm) #:use-module (gnu packages xorg)) +(define-public wlroots + (package + (name "wlroots") + (version "0.16.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/wlroots/wlroots") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1m12nv6avgnz626h3giqp6gcx44w1wq6z0jy780mx8z255ic7q15")))) + (build-system meson-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'hardcode-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "xwayland/server.c" + (("Xwayland") (string-append (assoc-ref inputs + "xorg-server-xwayland") + "/bin/Xwayland"))) + #t)) + (add-before 'configure 'fix-meson-file + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (substitute* "backend/drm/meson.build" + (("/usr/share/hwdata/pnp.ids") + (string-append (assoc-ref (or native-inputs inputs) "hwdata") + "/share/hwdata/pnp.ids")))))))) + (propagated-inputs + (list ;; As required by wlroots.pc. + eudev + libinput-minimal + libxkbcommon + mesa + pixman + libseat + wayland + wayland-protocols + xcb-util-errors + xcb-util-wm + xorg-server-xwayland)) + (native-inputs + (cons* + `(,hwdata "pnp") + pkg-config + wayland + (if (%current-target-system) + (list pkg-config-for-build) + '()))) + (home-page "https://gitlab.freedesktop.org/wlroots/wlroots/") + (synopsis "Pluggable, composable, unopinionated modules for building a +Wayland compositor") + (description "wlroots is a set of pluggable, composable, unopinionated +modules for building a Wayland compositor.") + (license license:expat))) ; MIT license + (define-public hyprland-protocols (package (name "hyprland-protocols")