[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Packages grow, no longer fit on a 💾
From: |
Katherine Cox-Buday |
Subject: |
Re: Packages grow, no longer fit on a 💾 |
Date: |
Thu, 19 Jan 2023 08:30:28 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
John Kehayias <john.kehayias@protonmail.com> writes:
>>> Efraim Flashner <efraim@flashner.co.il> skribis:
>>>
>>> I've made some progress on LLVM and I think I have a working LLVM
>>> that can be used as an input for mesa.
This is awesome! Thank you Efraim!
> I don't think there were any errors in building mesa with older LLVM,
> but on current hardware (unfortunately brings in non-free
> considerations) this was necessary. I believe this is the summary:
> <https://www.phoronix.com/news/LLVM-15-Branched>
I can confirm that 3D acceleration would not work until LLVM-15 was
used. I don't understand the entire rendering pipeline anymore, but I
think it had something to do with Vulkan.
> Props to katco on IRC for going through some long building and
> debugging to track this down.
Thanks, John!
Part of the reason this was difficult to test (aside from having to
discover the LLVM part) was discovering that the XORG_DRI_DRIVER_PATH
environment variable wasn't being set correctly despite doing package
rewriting to use a different version of Mesa.
I ended up doing this:
--8<---------------cut here---------------start------------->8---
(define-public (xorg-with-mesa xorg-server mesa)
"Returns an xorg-server package which will wrap the call to Xorg to include
the
correct XORG_DRI_DRIVER_PATH for the mesa package provided."
(package
(inherit xorg-server)
(arguments
(substitute-keyword-arguments
(package-arguments xorg-server)
((#:phases child-phases '%standard-phases)
#~(modify-phases #$child-phases
(add-after 'install 'wrap
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(xorg (string-append bin "/Xorg")))
(wrap-program xorg
'("XORG_DRI_DRIVER_PATH"
":" = (#$(file-append mesa "/lib/dri")))))))))))))
--8<---------------cut here---------------end--------------->8---
But something like this (I'm sure I've gotten the gexps wrong) would have been
made it much easier:
--8<---------------cut here---------------start------------->8---
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 5f073d05d3..d626e87073 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -196,7 +196,9 @@ (define-record-type* <xorg-configuration>
(server xorg-configuration-server ;file-like
(default xorg-server))
(server-arguments xorg-configuration-server-arguments ;list of strings
- (default %default-xorg-server-arguments)))
+ (default %default-xorg-server-arguments))
+ (mesa xorg-configuration-mesa ; package
+ (default mesa)))
(define (xorg-configuration->file config)
"Compute an Xorg configuration file corresponding to CONFIG, an
@@ -362,7 +364,7 @@ (define* (xorg-wrapper #:optional (config
(xorg-configuration)))
(define exp
;; Write a small wrapper around the X server.
#~(begin
- (setenv "XORG_DRI_DRIVER_PATH" (string-append #$mesa "/lib/dri"))
+ (setenv "XORG_DRI_DRIVER_PATH" (string-append
#$(xorg-configuration-mesa config) "/lib/dri"))
(setenv "XKB_BINDIR" (string-append #$xkbcomp "/bin"))
(let ((X (string-append #$(xorg-configuration-server config)
"/bin/X")))
--8<---------------cut here---------------end--------------->8---
--
Katherine
- Re: Packages grow, no longer fit on a 💾, (continued)
- Re: Packages grow, no longer fit on a 💾, kiasoc5, 2023/01/17
- Re: Packages grow, no longer fit on a 💾, indieterminacy, 2023/01/18
- Re: Packages grow, no longer fit on a 💾, Ludovic Courtès, 2023/01/19
- Re: Packages grow, no longer fit on a 💾, Simon Tournier, 2023/01/20
Re: Packages grow, no longer fit on a 💾, Efraim Flashner, 2023/01/17
Re: Packages grow, no longer fit on a 💾, Simon Tournier, 2023/01/17
Re: Packages grow, no longer fit on a 💾, Paul Jewell, 2023/01/18