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

View file

@ -111,6 +111,62 @@ rasterisation.")
(home-page "http://www.pixman.org/") (home-page "http://www.pixman.org/")
(license license:expat))) (license license:expat)))
(define-public libdrm-2.4.118
(package
(name "libdrm")
(version "2.4.118")
(source (origin
(method url-fetch)
(uri (string-append
"https://dri.freedesktop.org/libdrm/libdrm-"
version ".tar.xz"))
(sha256
(base32
"0br4c4ikcbm1s4sg09ld406izq5s1yk7b2n0mmvql77bwdlqv252"))))
(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
#~(modify-phases %standard-phases
;; A typo in a previous upstream commit disabled building
;; libdrm_intel by default on supported platforms. This was
;; fixed by the following change in upstream commit
;; 8a933c778a0eb36526bf3fc8a289e25add9ff8b0.
;; TODO: Remove on next update of libdrm.
(add-after 'unpack 'build-intel-by-default
(lambda _
(substitute* "meson.build"
(("system\\(\\)\\.startswith")
"cpu_family().startswith"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "meson" "test" "--timeout-multiplier" "5")))))))
(propagated-inputs
(list libpciaccess))
(native-inputs
(list pkg-config))
(home-page "https://dri.freedesktop.org/wiki/")
(synopsis "Direct rendering userspace library")
(description "The Direct Rendering Infrastructure, also known as the DRI,
is a framework for allowing direct access to graphics hardware under the
X Window System in a safe and efficient manner. It includes changes to the
X server, to several client libraries, and to the kernel (DRM, Direct
Rendering Manager). The most important use for the DRI is to create fast
OpenGL implementations providing hardware acceleration for Mesa.
Several 3D accelerated drivers have been written to the DRI specification,
including drivers for chipsets produced by 3DFX, AMD (formerly ATI), Intel
and Matrox.")
(license license:x11)))
(define-public wlroots-0.17 (define-public wlroots-0.17
(package (package
(name "wlroots") (name "wlroots")
@ -127,14 +183,10 @@ rasterisation.")
(build-system meson-build-system) (build-system meson-build-system)
(arguments (arguments
`(#:configure-flags `(#:configure-flags
'("-Dlibinput-backend=enabled" '("-Dauto_features=enabled")
"-Dauto_features=enabled")
#:phases #:phases
(modify-phases (modify-phases
%standard-phases %standard-phases
(add-before 'configure 'pre-configure
(lambda* (#:key outputs #:allow-other-keys)
(system "pkg-config --list-all")))
(add-before 'configure 'hardcode-paths (add-before 'configure 'hardcode-paths
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "xwayland/server.c" (substitute* "xwayland/server.c"
@ -152,6 +204,7 @@ rasterisation.")
(list ;; As required by wlroots.pc. (list ;; As required by wlroots.pc.
eudev eudev
ffmpeg-4 ffmpeg-4
glslang
libxkbcommon libxkbcommon
mesa mesa
pixman pixman
@ -166,6 +219,7 @@ rasterisation.")
wayland wayland
wayland-protocols wayland-protocols
xcb-util-errors xcb-util-errors
xcb-util-renderutil
xcb-util-wm xcb-util-wm
xorg-server-xwayland)) xorg-server-xwayland))
(inputs (inputs
@ -176,7 +230,84 @@ rasterisation.")
cmake cmake
hwdata hwdata
mesa-headers mesa-headers
vulkan-header vulkan-headers
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)))
(define-public wlroots-master
(package
(name "wlroots")
(version "fe6f380f2653751e95be6f99922d10bea1327145")
(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
"09g8vb9yq8b2nlvrgak197f98qcls5cdbvbva9mgr6spczgkjaxi"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
'("-Dauto_features=enabled")
#: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
ffmpeg-4
glslang
libxkbcommon
mesa
pixman
libcap
libdisplay-info
libinput
libpng
libseat
libxkbcommon
mesa
vulkan-loader
wayland
wayland-protocols
xcb-util-errors
xcb-util-renderutil
xcb-util-wm
xorg-server-xwayland))
(inputs
(list libdrm))
(native-inputs
(cons*
`(,hwdata "pnp")
cmake
hwdata
mesa-headers
vulkan-headers
pkg-config pkg-config
wayland wayland
(if (%current-target-system) (if (%current-target-system)
@ -271,7 +402,8 @@ Wayland compositor based on wlroots") (description "Hyprland.")
(commit (string-append "v" version)))) (commit (string-append "v" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "1b4d6r68cqx09blf5xdr1c23hw7axr8sx21wsxjjygqrhkkabdx7")) (base32
"1b4d6r68cqx09blf5xdr1c23hw7axr8sx21wsxjjygqrhkkabdx7"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
#~(begin #~(begin
@ -315,7 +447,7 @@ Wayland compositor based on wlroots") (description "Hyprland.")
pango pango
pciutils pciutils
udis86 udis86
wlroots-0.17 wlroots-master
xcb-util)) xcb-util))
(home-page "https://www.hyprland.org") (home-page "https://www.hyprland.org")
(synopsis "Dynamic tiling (synopsis "Dynamic tiling