* [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in Vulkan layer manifests.
@ 2022-11-21 19:09 Kaelyn Takata via Guix-patches via
2023-01-21 15:41 ` Kaelyn via Guix-patches via
2023-01-21 16:16 ` Bruno Victal
0 siblings, 2 replies; 4+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2022-11-21 19:09 UTC (permalink / raw)
To: 59453; +Cc: Kaelyn Takata
* gnu/packages/gl.scm (mesa): Fix library paths in Vulkan layer manifests.
---
gnu/packages/gl.scm | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index dd62fac13e..c26a51cb32 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -488,7 +488,28 @@ (define-public mesa
file)
(symlink reference file)))
others))))
- (delete-duplicates inodes))))))))
+ (delete-duplicates inodes)))))
+ (add-after 'install 'set-layer-path-in-manifests
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (implicit-path (string-append
+ out
+ "/share/vulkan/implicit_layer.d/"))
+ (explicit-path (string-append
+ out
+ "/share/vulkan/explicit_layer.d/"))
+ (fix-layer-path
+ (lambda (layer-name)
+ (let* ((explicit (string-append explicit-path layer-name ".json"))
+ (implicit (string-append implicit-path layer-name ".json"))
+ (manifest (if (file-exists? explicit)
+ explicit
+ implicit)))
+ (substitute* manifest
+ (((string-append "\"lib" layer-name ".so\""))
+ (string-append "\"" out "/lib/lib" layer-name ".so\"")))))))
+ (for-each fix-layer-path '("VkLayer_MESA_device_select"
+ "VkLayer_MESA_overlay"))))))))
(home-page "https://mesa3d.org/")
(synopsis "OpenGL and Vulkan implementations")
(description "Mesa is a free implementation of the OpenGL and Vulkan
base-commit: affaacf4f46639dcc8239a438cad11c2a6ef6c9a
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in Vulkan layer manifests.
2022-11-21 19:09 [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in Vulkan layer manifests Kaelyn Takata via Guix-patches via
@ 2023-01-21 15:41 ` Kaelyn via Guix-patches via
2023-01-21 16:16 ` Bruno Victal
1 sibling, 0 replies; 4+ messages in thread
From: Kaelyn via Guix-patches via @ 2023-01-21 15:41 UTC (permalink / raw)
To: guix-devel; +Cc: 59453@debbugs.gnu.org
Hi Guix devs,
Now that it's been a couple of months, I wanted to bump my core-updates patch to Mesa which fixes the library paths in Mesa's Vulkan layer manifest files (https://issues.guix.gnu.org/59453). The patch also resolves https://issues.guix.gnu.org/58251.
Cheers,
Kaelyn
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in Vulkan layer manifests.
2022-11-21 19:09 [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in Vulkan layer manifests Kaelyn Takata via Guix-patches via
2023-01-21 15:41 ` Kaelyn via Guix-patches via
@ 2023-01-21 16:16 ` Bruno Victal
2023-02-12 18:20 ` Kaelyn via Guix-patches via
1 sibling, 1 reply; 4+ messages in thread
From: Bruno Victal @ 2023-01-21 16:16 UTC (permalink / raw)
To: Kaelyn Takata; +Cc: 59453
On 2022-11-21 19:09, Kaelyn Takata via Guix-patches via wrote:
> * gnu/packages/gl.scm (mesa): Fix library paths in Vulkan layer manifests.
> ---
> gnu/packages/gl.scm | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
> index dd62fac13e..c26a51cb32 100644
> --- a/gnu/packages/gl.scm
> +++ b/gnu/packages/gl.scm
> @@ -488,7 +488,28 @@ (define-public mesa
> file)
> (symlink reference file)))
> others))))
> - (delete-duplicates inodes))))))))
> + (delete-duplicates inodes)))))
> + (add-after 'install 'set-layer-path-in-manifests
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
Using G-Expressions would be better here, since you're modifying this package,
you could take the opportunity to modernize/rewrite this package definition using G-Expressions.
(Keep the rewrite and this fix in separate commits)
> + (implicit-path (string-append
> + out
> + "/share/vulkan/implicit_layer.d/"))
> + (explicit-path (string-append
> + out
> + "/share/vulkan/explicit_layer.d/"))
> + (fix-layer-path
> + (lambda (layer-name)
> + (let* ((explicit (string-append explicit-path layer-name ".json"))
> + (implicit (string-append implicit-path layer-name ".json"))
> + (manifest (if (file-exists? explicit)
> + explicit
> + implicit)))
> + (substitute* manifest
> + (((string-append "\"lib" layer-name ".so\""))
> + (string-append "\"" out "/lib/lib" layer-name ".so\"")))))))
> + (for-each fix-layer-path '("VkLayer_MESA_device_select"
> + "VkLayer_MESA_overlay"))))))))
> (home-page "https://mesa3d.org/")
> (synopsis "OpenGL and Vulkan implementations")
> (description "Mesa is a free implementation of the OpenGL and Vulkan
>
> base-commit: affaacf4f46639dcc8239a438cad11c2a6ef6c9a
> --
> 2.38.1
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in Vulkan layer manifests.
2023-01-21 16:16 ` Bruno Victal
@ 2023-02-12 18:20 ` Kaelyn via Guix-patches via
0 siblings, 0 replies; 4+ messages in thread
From: Kaelyn via Guix-patches via @ 2023-02-12 18:20 UTC (permalink / raw)
To: Bruno Victal; +Cc: 59453
------- Original Message -------
On Saturday, January 21st, 2023 at 4:16 PM, Bruno Victal <mirai@makinata.eu> wrote:
>
> On 2022-11-21 19:09, Kaelyn Takata via Guix-patches via wrote:
>
> > * gnu/packages/gl.scm (mesa): Fix library paths in Vulkan layer manifests.
> > ---
> > gnu/packages/gl.scm | 23 ++++++++++++++++++++++-
> > 1 file changed, 22 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
> > index dd62fac13e..c26a51cb32 100644
> > --- a/gnu/packages/gl.scm
> > +++ b/gnu/packages/gl.scm
> > @@ -488,7 +488,28 @@ (define-public mesa
> > file)
> > (symlink reference file)))
> > others))))
> > - (delete-duplicates inodes))))))))
> > + (delete-duplicates inodes)))))
> > + (add-after 'install 'set-layer-path-in-manifests
> > + (lambda* (#:key outputs #:allow-other-keys)
> > + (let* ((out (assoc-ref outputs "out"))
>
>
> Using G-Expressions would be better here, since you're modifying this package,
> you could take the opportunity to modernize/rewrite this package definition using G-Expressions.
> (Keep the rewrite and this fix in separate commits)
Given the complexity of the mesa package definition including the numerous matches on %current-system, I'm not confident or comfortable in my ability to rewrite mesa's package-arguments to use gexps. I certainly don't want to delay fixing the Vulkan layer library paths on core-updates packages even longer than it already has been trying to rewrite a complex core package.
Cheers,
Kaelyn
>
> > + (implicit-path (string-append
> > + out
> > + "/share/vulkan/implicit_layer.d/"))
> > + (explicit-path (string-append
> > + out
> > + "/share/vulkan/explicit_layer.d/"))
> > + (fix-layer-path
> > + (lambda (layer-name)
> > + (let* ((explicit (string-append explicit-path layer-name ".json"))
> > + (implicit (string-append implicit-path layer-name ".json"))
> > + (manifest (if (file-exists? explicit)
> > + explicit
> > + implicit)))
> > + (substitute* manifest
> > + (((string-append "\"lib" layer-name ".so\""))
> > + (string-append "\"" out "/lib/lib" layer-name ".so\"")))))))
> > + (for-each fix-layer-path '("VkLayer_MESA_device_select"
> > + "VkLayer_MESA_overlay"))))))))
> > (home-page "https://mesa3d.org/")
> > (synopsis "OpenGL and Vulkan implementations")
> > (description "Mesa is a free implementation of the OpenGL and Vulkan
> >
> > base-commit: affaacf4f46639dcc8239a438cad11c2a6ef6c9a
> > --
> > 2.38.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-12 18:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 19:09 [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in Vulkan layer manifests Kaelyn Takata via Guix-patches via
2023-01-21 15:41 ` Kaelyn via Guix-patches via
2023-01-21 16:16 ` Bruno Victal
2023-02-12 18:20 ` Kaelyn via Guix-patches via
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).