From ef401b48324e803e41a47acfc801a96eec6d3e3a Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Sun, 10 Dec 2023 01:23:42 +0100 Subject: [PATCH] Maybe Hyprland --- zilti/packages/hyprland.scm | 84 ++++++++++++++++++++++++++++--------- 1 file changed, 64 insertions(+), 20 deletions(-) diff --git a/zilti/packages/hyprland.scm b/zilti/packages/hyprland.scm index 617d74d..19e353a 100644 --- a/zilti/packages/hyprland.scm +++ b/zilti/packages/hyprland.scm @@ -12,11 +12,13 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages build-tools) + #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gcc) #:use-module (gnu packages gl) + #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages hardware) #:use-module (gnu packages image) @@ -111,6 +113,53 @@ rasterisation.") (home-page "http://www.pixman.org/") (license license:expat))) +(define-public libinput-1.24 + ;; Updating this will rebuild over 700 packages through libinput-minimal. + (package + (name "libinput") + (version "1.24.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/libinput/libinput.git") + (commit version))) + (sha256 + (base32 + "0xk0dljykjfmkks7kjxvbia6g3wadmy7lihfygm8icywkq8j0dw1")))) + (build-system meson-build-system) + (arguments + `(#:configure-flags '("-Ddocumentation=false") + #:tests? #f + + ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that + ;; hangs, and the comments around it suggests that we should be using this + ;; Meson target anyway. + #:build-type "release")) + (native-inputs + (append (list check pkg-config) + (if (%current-target-system) + (list pkg-config-for-build) + '()))) + (inputs + (append (list cairo + glib + gtk+ + libevdev + libwacom + mtdev) + (if (%current-target-system) + (list check) + '()))) + (propagated-inputs + `(;; libinput.h requires , so propagate it. + ("udev" ,eudev))) + (home-page "https://www.freedesktop.org/wiki/Software/libinput/") + (synopsis "Input devices handling library") + (description + "Libinput is a library to handle input devices for display servers and +other applications that need to directly deal with input devices.") + (license license:x11))) + (define-public libdrm-2.4.118 (package (name "libdrm") @@ -122,19 +171,10 @@ rasterisation.") version ".tar.xz")) (sha256 (base32 - "0br4c4ikcbm1s4sg09ld406izq5s1yk7b2n0mmvql77bwdlqv252")))) + "125bcyarlzlxfq57viyvmxy32y0561c21j46z1brrz5mya2vsxx7")))) (build-system meson-build-system) (arguments - (list #:configure-flags - (match (%current-system) - ((or "armhf-linux" "aarch64-linux") - #~(list "-Dexynos=enabled" - "-Domap=enabled" - "-Detnaviv=enabled" - "-Dtegra=enabled" - "-Dfreedreno-kgsl=true")) - (_ ''())) - #:phases + (list #:phases #~(modify-phases %standard-phases ;; A typo in a previous upstream commit disabled building ;; libdrm_intel by default on supported platforms. This was @@ -210,7 +250,7 @@ and Matrox.") pixman libcap libdisplay-info - libinput + libinput-1.24 libpng libseat libxkbcommon @@ -223,7 +263,7 @@ and Matrox.") xcb-util-wm xorg-server-xwayland)) (inputs - (list libdrm)) + (list libdrm-2.4.118)) (native-inputs (cons* `(,hwdata "pnp") @@ -287,7 +327,7 @@ modules for building a Wayland compositor.") pixman libcap libdisplay-info - libinput + libinput-1.24 libpng libseat libxkbcommon @@ -300,7 +340,7 @@ modules for building a Wayland compositor.") xcb-util-wm xorg-server-xwayland)) (inputs - (list libdrm)) + (list libdrm-2.4.118)) (native-inputs (cons* `(,hwdata "pnp") @@ -407,6 +447,13 @@ Wayland compositor based on wlroots") (description "Hyprland.") (modules '((guix build utils))) (snippet #~(begin + (copy-file "src/version.h.in" "src/version.h") + (substitute* "src/version.h" + (("@HASH@") #$version) + (("@BRANCH@") "") + (("@MESSAGE@") "") + (("@TAG@") "") + (("@DIRTY@") "")) (substitute* "src/render/OpenGL.cpp" (("/usr") "$out")))))) (build-system meson-build-system) @@ -416,9 +463,6 @@ Wayland compositor based on wlroots") (description "Hyprland.") (add-before 'configure 'pre-configure (lambda* (#:key outputs #:allow-other-keys) - (system "pkg-config --list-all") - (system "pkg-config --libs wlroots") - (system "pkg-config --mobversion wlroots") (system "patch -p1 -i nix/patches/meson-build.patch") (system "cat src/meson.build")))))) (native-inputs @@ -438,9 +482,9 @@ Wayland compositor based on wlroots") (description "Hyprland.") hyprland-protocols libdisplay-info libglvnd - libinput + libinput-1.24 libxkbcommon - libdrm + libdrm-2.4.118 mesa wayland wayland-protocols