GNU bug report logs - #74695
[PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Rutherther <rutherther@HIDDEN>; Keywords: patch; dated Wed, 4 Dec 2024 19:14:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 74695 <at> debbugs.gnu.org:


Received: (at 74695) by debbugs.gnu.org; 4 Dec 2024 19:16:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 04 14:16:11 2024
Received: from localhost ([127.0.0.1]:36903 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tIur4-0002M1-LO
	for submit <at> debbugs.gnu.org; Wed, 04 Dec 2024 14:16:11 -0500
Received: from ditigal.xyz ([78.46.201.50]:42640 helo=mail.ditigal.xyz)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rutherther@HIDDEN>) id 1tIur3-0002Lk-0q
 for 74695 <at> debbugs.gnu.org; Wed, 04 Dec 2024 14:16:09 -0500
Received: by cerebrum (OpenSMTPD) with ESMTPSA id 99c60681
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Wed, 4 Dec 2024 19:16:01 +0000 (UTC)
From: Rutherther <rutherther@HIDDEN>
To: 74695 <at> debbugs.gnu.org
Subject: [PATCH 1/1] guix: qt: add inputs and outputs build variables in
 qt-build
Date: Wed,  4 Dec 2024 20:15:36 +0100
Message-ID: <5ca3416dfabd3dfd5643a6f656c1d02fa3f37e61.1733339135.git.rutherther@HIDDEN>
X-Mailer: git-send-email 2.46.0
In-Reply-To: <cover.1733339135.git.rutherther@HIDDEN>
References: <cover.1733339135.git.rutherther@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: =?utf-8?b?TWF4aW0gQ291cm5veWVyIDxtYXhpbS5jb3Vybm95ZXJAZ21haWwuY29tPiwgw6XCrsKLw6bClsKHw6bCrcKmIDxpeXpzb25nQGVudnMubmV0Pg==?=
Content-Transfer-Encoding: 8bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz;
 i=@ditigal.xyz; q=dns/txt; s=20240917; t=1733339761; h=from : to : cc
 : subject : date : message-id : in-reply-to : references :
 mime-version : content-transfer-encoding : from;
 bh=ZLSz8gNRak0o62zakjpxS3jorT/54MFcdQVLnvDjuOY=;
 b=NJGqHkAskSFI+XdF9iHA+CY62UoDjLU/67JNqX2+1W7Op5G2bdviuhrGOdW5mzTcyIfaw
 n+vDxF8jNxO6ILvwGZEjA4qpSaBvSXmdlvmVL721fNOIqQ8uDkrfXte/w9I0lmO/4+zZCv7
 0bflosK8OuHdXIX7XQPl5j3Hd/kAzos=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74695
Cc: Rutherther <rutherther@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Qt build doesn't provide build-variables of inputs and outputs,
so it's not possible to refer to %outputs in arguments of
a package that uses qt-build-system. This patch unifies
qt-build-system's behavior with other build systems like
cmake-build-system or gnu-build-system.

* guix/build-system/qt.scm (qt-build): Wrap with with-build-variables to
provide variables to arguments

Change-Id: I65853a5831ce7b5dc7ebe10807c6e61bb89cab36
---
 guix/build-system/qt.scm | 54 +++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 26 deletions(-)

diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm
index d1f721c54e..5f9a5019ae 100644
--- a/guix/build-system/qt.scm
+++ b/guix/build-system/qt.scm
@@ -152,32 +152,34 @@ (define* (qt-build name inputs
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
-          (qt-build #:source #+source
-                    #:system #$system
-                    #:outputs #$(outputs->gexp outputs)
-                    #:inputs #$(input-tuples->gexp inputs)
-                    #:search-paths '#$(sexp->gexp
-                                       (map search-path-specification->sexp
-                                            search-paths))
-                    #:phases #$(if (pair? phases)
-                                   (sexp->gexp phases)
-                                   phases)
-                    #:qtbase #+qtbase
-                    #:qt-wrap-excluded-outputs #$qt-wrap-excluded-outputs
-                    #:qt-wrap-excluded-inputs #$qt-wrap-excluded-inputs
-                    #:configure-flags #$configure-flags
-                    #:make-flags #$make-flags
-                    #:out-of-source? #$out-of-source?
-                    #:build-type #$build-type
-                    #:tests? #$tests?
-                    #:test-target #$test-target
-                    #:parallel-build? #$parallel-build?
-                    #:parallel-tests? #$parallel-tests?
-                    #:validate-runpath? #$validate-runpath?
-                    #:patch-shebangs? #$patch-shebangs?
-                    #:strip-binaries? #$strip-binaries?
-                    #:strip-flags #$strip-flags
-                    #:strip-directories #$strip-directories))))
+
+          #$(with-build-variables inputs outputs
+              #~(qt-build #:source #+source
+                          #:system #$system
+                          #:outputs %outputs
+                          #:inputs %build-inputs
+                          #:search-paths '#$(sexp->gexp
+                                             (map search-path-specification->sexp
+                                                  search-paths))
+                          #:phases #$(if (pair? phases)
+                                         (sexp->gexp phases)
+                                         phases)
+                          #:qtbase #+qtbase
+                          #:qt-wrap-excluded-outputs #$qt-wrap-excluded-outputs
+                          #:qt-wrap-excluded-inputs #$qt-wrap-excluded-inputs
+                          #:configure-flags #$configure-flags
+                          #:make-flags #$make-flags
+                          #:out-of-source? #$out-of-source?
+                          #:build-type #$build-type
+                          #:tests? #$tests?
+                          #:test-target #$test-target
+                          #:parallel-build? #$parallel-build?
+                          #:parallel-tests? #$parallel-tests?
+                          #:validate-runpath? #$validate-runpath?
+                          #:patch-shebangs? #$patch-shebangs?
+                          #:strip-binaries? #$strip-binaries?
+                          #:strip-flags #$strip-flags
+                          #:strip-directories #$strip-directories)))))
 
   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
-- 
2.46.0




Information forwarded to maxim.cournoyer@HIDDEN, iyzsong@HIDDEN, guix-patches@HIDDEN:
bug#74695; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Dec 2024 19:13:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 04 14:13:44 2024
Received: from localhost ([127.0.0.1]:36888 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tIuoh-0002AV-TQ
	for submit <at> debbugs.gnu.org; Wed, 04 Dec 2024 14:13:44 -0500
Received: from lists.gnu.org ([209.51.188.17]:59356)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rutherther@HIDDEN>) id 1tIuof-0002AJ-V6
 for submit <at> debbugs.gnu.org; Wed, 04 Dec 2024 14:13:42 -0500
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 <rutherther@HIDDEN>)
 id 1tIuoc-0006c1-06
 for guix-patches@HIDDEN; Wed, 04 Dec 2024 14:13:38 -0500
Received: from ditigal.xyz ([2a01:4f8:1c1b:6a1c::] helo=mail.ditigal.xyz)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <rutherther@HIDDEN>)
 id 1tIuoZ-0006EO-QL
 for guix-patches@HIDDEN; Wed, 04 Dec 2024 14:13:37 -0500
Received: by cerebrum (OpenSMTPD) with ESMTPSA id 7e64a2e6
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Wed, 4 Dec 2024 19:13:30 +0000 (UTC)
From: Rutherther <rutherther@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/1] qt-build-system: Wrap with build variables to allow
 %outputs in arguments
Date: Wed,  4 Dec 2024 20:13:27 +0100
Message-ID: <cover.1733339135.git.rutherther@HIDDEN>
X-Mailer: git-send-email 2.46.0
MIME-Version: 1.0
X-Debbugs-CC: guix-devel@HIDDEN
X-Debbugs-Cc: =?utf-8?b?TWF4aW0gQ291cm5veWVyIDxtYXhpbS5jb3Vybm95ZXJAZ21haWwuY29tPiwgw6XCrsKLw6bClsKHw6bCrcKmIDxpeXpzb25nQGVudnMubmV0Pg==?=
Content-Transfer-Encoding: 8bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz;
 i=@ditigal.xyz; q=dns/txt; s=20240917; t=1733339610; h=from : to : cc
 : subject : date : message-id : mime-version :
 content-transfer-encoding : from;
 bh=mPY3TwIbkF9b1G8YmrgFaTaO79WsMkRpl1OmUCRqO+w=;
 b=e0QgEK31bQ36qDc0ePVHW3aArthgPW3mMBcdV8gOc+jxelG7UhP19w0HdCL2as/dhtHXE
 Vm9vLccJUO8vLONzgMSn1wvFftFt6W+kRMMCaoIV8kErXf5eIjxfkLeQJMmJE178SYoZ0HV
 R3NqkQY/C4k4rtjkyocs6jNCo4oTi6g=
Received-SPF: pass client-ip=2a01:4f8:1c1b:6a1c::;
 envelope-from=rutherther@HIDDEN; helo=mail.ditigal.xyz
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: Rutherther <rutherther@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

It is impossible to refer to %outputs in arguments like #:configure-flags
(ie. `(assoc-ref %outputs "out")` leads to unbound-variable %outputs).
I think the issue is in qt using different system than build systems such
as cmake or gnu. Since I am unsure about the reason for qt not having
the same structure, I am submitting this to guix devel for discussion,
as well as opening a patch in case this is fine to be merged. If not,
could someone please explain what the reason behind not adding
inputs and outputs is, and what is the alternative?

Regards,
Rutherther

Rutherther (1):
  guix: qt: add inputs and outputs build variables in qt-build

 guix/build-system/qt.scm | 54 +++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 26 deletions(-)


base-commit: 006679d1e6ca7acea0629b4f019c8cf89cde08be
--
2.46.0




Acknowledgement sent to Rutherther <rutherther@HIDDEN>:
New bug report received and forwarded. Copy sent to maxim.cournoyer@HIDDEN, iyzsong@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to maxim.cournoyer@HIDDEN, iyzsong@HIDDEN, guix-patches@HIDDEN:
bug#74695; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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