Maybe Hyprland

This commit is contained in:
Daniel Ziltener 2023-12-10 01:23:42 +01:00
parent 4eebfa638a
commit ef401b4832
Signed by: zilti
GPG key ID: B38976E82C9DAE42

View file

@ -12,11 +12,13 @@
#:use-module (gnu packages autotools) #:use-module (gnu packages autotools)
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (gnu packages build-tools) #:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake) #:use-module (gnu packages cmake)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages freedesktop) #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gcc) #:use-module (gnu packages gcc)
#:use-module (gnu packages gl) #:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk) #:use-module (gnu packages gtk)
#:use-module (gnu packages hardware) #:use-module (gnu packages hardware)
#:use-module (gnu packages image) #:use-module (gnu packages image)
@ -111,6 +113,53 @@ rasterisation.")
(home-page "http://www.pixman.org/") (home-page "http://www.pixman.org/")
(license license:expat))) (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 <libudev.h>, 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 (define-public libdrm-2.4.118
(package (package
(name "libdrm") (name "libdrm")
@ -122,19 +171,10 @@ rasterisation.")
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"0br4c4ikcbm1s4sg09ld406izq5s1yk7b2n0mmvql77bwdlqv252")))) "125bcyarlzlxfq57viyvmxy32y0561c21j46z1brrz5mya2vsxx7"))))
(build-system meson-build-system) (build-system meson-build-system)
(arguments (arguments
(list #:configure-flags (list #:phases
(match (%current-system)
((or "armhf-linux" "aarch64-linux")
#~(list "-Dexynos=enabled"
"-Domap=enabled"
"-Detnaviv=enabled"
"-Dtegra=enabled"
"-Dfreedreno-kgsl=true"))
(_ ''()))
#:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
;; A typo in a previous upstream commit disabled building ;; A typo in a previous upstream commit disabled building
;; libdrm_intel by default on supported platforms. This was ;; libdrm_intel by default on supported platforms. This was
@ -210,7 +250,7 @@ and Matrox.")
pixman pixman
libcap libcap
libdisplay-info libdisplay-info
libinput libinput-1.24
libpng libpng
libseat libseat
libxkbcommon libxkbcommon
@ -223,7 +263,7 @@ and Matrox.")
xcb-util-wm xcb-util-wm
xorg-server-xwayland)) xorg-server-xwayland))
(inputs (inputs
(list libdrm)) (list libdrm-2.4.118))
(native-inputs (native-inputs
(cons* (cons*
`(,hwdata "pnp") `(,hwdata "pnp")
@ -287,7 +327,7 @@ modules for building a Wayland compositor.")
pixman pixman
libcap libcap
libdisplay-info libdisplay-info
libinput libinput-1.24
libpng libpng
libseat libseat
libxkbcommon libxkbcommon
@ -300,7 +340,7 @@ modules for building a Wayland compositor.")
xcb-util-wm xcb-util-wm
xorg-server-xwayland)) xorg-server-xwayland))
(inputs (inputs
(list libdrm)) (list libdrm-2.4.118))
(native-inputs (native-inputs
(cons* (cons*
`(,hwdata "pnp") `(,hwdata "pnp")
@ -407,6 +447,13 @@ Wayland compositor based on wlroots") (description "Hyprland.")
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
#~(begin #~(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" (substitute* "src/render/OpenGL.cpp"
(("/usr") "$out")))))) (("/usr") "$out"))))))
(build-system meson-build-system) (build-system meson-build-system)
@ -416,9 +463,6 @@ Wayland compositor based on wlroots") (description "Hyprland.")
(add-before 'configure (add-before 'configure
'pre-configure 'pre-configure
(lambda* (#:key outputs #:allow-other-keys) (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 "patch -p1 -i nix/patches/meson-build.patch")
(system "cat src/meson.build")))))) (system "cat src/meson.build"))))))
(native-inputs (native-inputs
@ -438,9 +482,9 @@ Wayland compositor based on wlroots") (description "Hyprland.")
hyprland-protocols hyprland-protocols
libdisplay-info libdisplay-info
libglvnd libglvnd
libinput libinput-1.24
libxkbcommon libxkbcommon
libdrm libdrm-2.4.118
mesa mesa
wayland wayland
wayland-protocols wayland-protocols