diff mbox series

[bug#63219,mesa-branch,v3,2/4] gnu: mesa: Use gexps instead of quasiquote.

Message ID 7ff21afd6c6446d9f986ecf6982b41722fed81ac.1683230943.git.kaelyn.alexi@protonmail.com
State New
Headers show
Series Mesa update plus various fixes and cleanups. | expand

Commit Message

Kaelyn Takata May 4, 2023, 8:12 p.m. UTC
* gnu/packages/gl.scm (mesa)[arguments]: Use gexps instead of quasiquote.
---
 gnu/packages/gl.scm | 48 +++++++++++++++++++++++----------------------
 1 file changed, 25 insertions(+), 23 deletions(-)

--
2.39.2
diff mbox series

Patch

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 6521170ebb..f705b864f1 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -315,8 +315,10 @@  (define-public mesa
            (@ (gnu packages base) which)))
     (outputs '("out" "bin"))
     (arguments
-     `(#:configure-flags
-       '(,@(match (%current-system)
+     (list
+      #:configure-flags
+      #~(list
+         #$@(match (%current-system)
              ("aarch64-linux"
               ;; TODO: Fix svga driver for non-Intel architectures.
               '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,\
@@ -345,7 +347,7 @@  (define-public mesa
          "-Dshared-glapi=enabled"

          ;; Explicitly enable Vulkan on some architectures.
-         ,@(match (%current-system)
+         #$@(match (%current-system)
              ((or "i686-linux" "x86_64-linux")
               '("-Dvulkan-drivers=intel,amd"))
              ((or "powerpc64le-linux" "powerpc-linux")
@@ -369,12 +371,12 @@  (define-public mesa
        ;; documentation recommends using 'release' for performance anyway.
        #:build-type "release"

-       #:modules ((ice-9 match)
-                  (srfi srfi-1)
-                  (guix build utils)
-                  (guix build meson-build-system))
+       #:modules '((ice-9 match)
+                   (srfi srfi-1)
+                   (guix build utils)
+                   (guix build meson-build-system))
        #:phases
-       (modify-phases %standard-phases
+       #~(modify-phases %standard-phases
          (add-after 'unpack 'disable-failing-test
            (lambda _
              ;; Disable the intel vulkan (anv_state_pool) tests, as they may
@@ -383,7 +385,7 @@  (define-public mesa
              (substitute* "src/intel/vulkan/meson.build"
                (("if with_tests")
                 "if false"))
-             ,@(match (%current-system)
+             #$@(match (%current-system)
                  ("riscv64-linux"
                   ;; According to the test logs the llvm JIT is not designed
                   ;; for this architecture and the llvmpipe tests all segfault.
@@ -428,8 +430,8 @@  (define-public mesa
                  (_
                   '((display "No tests to disable on this architecture.\n"))))))
          (add-before 'configure 'fix-dlopen-libnames
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
+           (lambda _
+             (let ((out #$output))
                ;; Remain agnostic to .so.X.Y.Z versions while doing
                ;; the substitutions so we're future-safe.
                (substitute* "src/glx/meson.build"
@@ -446,9 +448,9 @@  (define-public mesa
                  (("\"gbm_dri\\.so")
                   (string-append "\"" out "/lib/dri/gbm_dri.so"))))))
          (add-after 'install 'split-outputs
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (bin (assoc-ref outputs "bin")))
+           (lambda _
+             (let ((out #$output)
+                   (bin #$output:bin))
                ;; Not all architectures have the Vulkan overlay control script.
                (mkdir-p (string-append out "/bin"))
                (call-with-output-file (string-append out "/bin/.empty")
@@ -457,13 +459,13 @@  (define-public mesa
                                  (string-append bin "/bin"))
                (delete-file-recursively (string-append out "/bin")))))
          (add-after 'install 'symlinks-instead-of-hard-links
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda _
              ;; All the drivers and gallium targets create hard links upon
              ;; installation (search for "hardlink each megadriver instance"
              ;; in the makefiles).  This is no good for us since we'd produce
              ;; nars that contain several copies of these files.  Thus, turn
              ;; them into symlinks, which saves ~124 MiB.
-             (let* ((out    (assoc-ref outputs "out"))
+             (let* ((out    #$output)
                     (lib    (string-append out "/lib"))
                     (files  (find-files lib
                                         (lambda (file stat)
@@ -491,8 +493,8 @@  (define-public mesa
                                         others))))
                          (delete-duplicates inodes)))))
          (add-after 'install 'set-layer-path-in-manifests
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
+           (lambda _
+             (let* ((out #$output)
                     (implicit-path (string-append
                                     out
                                     "/share/vulkan/implicit_layer.d/"))
@@ -529,7 +531,7 @@  (define-public mesa-opencl
     (arguments
      (substitute-keyword-arguments (package-arguments mesa)
        ((#:configure-flags flags)
-        `(cons "-Dgallium-opencl=standalone" ,flags))))
+        #~(cons "-Dgallium-opencl=standalone" #$flags))))
     (inputs
      (modify-inputs (package-inputs mesa)
        (prepend libclc)))
@@ -543,10 +545,10 @@  (define-public mesa-opencl-icd
     (arguments
       (substitute-keyword-arguments (package-arguments mesa)
         ((#:configure-flags flags)
-         `(cons "-Dgallium-opencl=icd"
-                ,(delete "-Dgallium-opencl=standalone" flags)))
+         #~(cons "-Dgallium-opencl=icd"
+                (delete "-Dgallium-opencl=standalone" #$flags)))
         ((#:phases phases)
-         `(modify-phases ,phases
+         #~(modify-phases #$phases
             (add-after 'install 'mesa-icd-absolute-path
               (lambda _
                 ;; Use absolute path for OpenCL platform library.
@@ -554,7 +556,7 @@  (define-public mesa-opencl-icd
                 ;; for ICD in our applications to find OpenCL platform.
                 (use-modules (guix build utils)
                              (ice-9 textual-ports))
-                (let* ((out (assoc-ref %outputs "out"))
+                (let* ((out #$output)
                        (mesa-icd (string-append out "/etc/OpenCL/vendors/mesa.icd"))
                        (old-path (call-with-input-file mesa-icd get-string-all))
                        (new-path (string-append out "/lib/" (string-trim-both old-path))))