From patchwork Tue May 2 04:44:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaelyn Takata X-Patchwork-Id: 49743 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A292F27BBEA; Tue, 2 May 2023 05:45:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0630727BBE9 for ; Tue, 2 May 2023 05:45:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pthsu-0001bc-Vl; Tue, 02 May 2023 00:45:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pthss-0001bL-Uh for guix-patches@gnu.org; Tue, 02 May 2023 00:45:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pthss-0006PN-1t for guix-patches@gnu.org; Tue, 02 May 2023 00:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pthsr-0005Jm-UO for guix-patches@gnu.org; Tue, 02 May 2023 00:45:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63219] [PATCH mesa-branch v2 2/4] gnu: mesa: Use gexps instead of quasiquote. References: In-Reply-To: Resent-From: Kaelyn Takata Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 May 2023 04:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63219 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63219@debbugs.gnu.org Cc: Kaelyn Takata Received: via spool by 63219-submit@debbugs.gnu.org id=B63219.168300266720384 (code B ref 63219); Tue, 02 May 2023 04:45:01 +0000 Received: (at 63219) by debbugs.gnu.org; 2 May 2023 04:44:27 +0000 Received: from localhost ([127.0.0.1]:41443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pthsJ-0005Ii-0B for submit@debbugs.gnu.org; Tue, 02 May 2023 00:44:27 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:50737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pthsG-0005IR-22 for 63219@debbugs.gnu.org; Tue, 02 May 2023 00:44:25 -0400 Date: Tue, 02 May 2023 04:44:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1683002656; x=1683261856; bh=abL49T01FaUnnuiWiAbanAWJ19wckPkCkExifB/K8t4=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=wnw0yJSNsC5Tv13uivJZoRLwTkl2IKQ+HwxSRlO9J2y2RpR65gDcq8TesXkDos1Xh rjJ0krGvlR+5BoR6P6QHjIwNWqraEeTGSiGaVqfnXbRUwnriVDVT+Re0SLxiArrlIt oR4ouuilagH+Q/sn6nuCpqo/rnawypNxA0ewkbthHFdp8sd4hcELDg65FHr5XGZNjQ OTYwmSI4GNWx7tSg+Zj0GK17VLcq2/Uz16YH3lhuntaxVFG3VuVNMAnuoq1inhCXIM 22BKbOrZucLFJLENUSIftWIkZ7TKy/dLizTGwr8mFAdYRo+JHfhGWnJeh8RLKN3/E/ osLoGIxJlUFVQ== Message-ID: <25a13f2aeea918cbee30449f2c216f7f436d568e.1683002606.git.kaelyn.alexi@protonmail.com> Feedback-ID: 34709329:user:proton MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Kaelyn Takata X-ACL-Warn: , Kaelyn Takata via Guix-patches X-Patchwork-Original-From: Kaelyn Takata via Guix-patches via From: Kaelyn Takata Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 --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))))