GNU bug report logs - #59453
[PATCH core-updates] gnu: mesa: Fix library paths in Vulkan layer manifests.

Previous Next

Package: guix-patches;

Reported by: Kaelyn Takata <kaelyn.alexi <at> protonmail.com>

Date: Mon, 21 Nov 2022 19:11:01 UTC

Severity: normal

Tags: patch

Done: Kaelyn <kaelyn.alexi <at> protonmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 59453 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: Kaelyn Takata <kaelyn.alexi <at> protonmail.com>
Cc: 59453 <at> debbugs.gnu.org
Subject: Re: [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in
 Vulkan layer manifests.
Date: Sat, 21 Jan 2023 16:16:28 +0000
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
> 
> 
> 
> 
> 





This bug report was last modified 2 years and 29 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.