unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments
@ 2024-12-04 22:17 Rutherther
  2024-12-05  6:18 ` John Kehayias via Development of GNU Guix and the GNU System distribution.
  0 siblings, 1 reply; 3+ messages in thread
From: Rutherther @ 2024-12-04 22:17 UTC (permalink / raw)
  To: guix-devel; +Cc: Rutherther

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments
  2024-12-04 22:17 [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments Rutherther
@ 2024-12-05  6:18 ` John Kehayias via Development of GNU Guix and the GNU System distribution.
  2024-12-05  7:35   ` Rutherther
  0 siblings, 1 reply; 3+ messages in thread
From: John Kehayias via Development of GNU Guix and the GNU System distribution. @ 2024-12-05  6:18 UTC (permalink / raw)
  To: Rutherther; +Cc: guix-devel

Hi Rutherther,

On Wed, Dec 04, 2024 at 11:17 PM, Rutherther wrote:

> It is impossible to refer to %outputs in arguments like #:configure-flags
> (ie. `(assoc-ref %outputs "out")` leads to unbound-variable %outputs).

You should be able to use gexps, e.g. #$output (see
<https://guix.gnu.org/manual/devel/en/html_node/G_002dExpressions.html>
for more details). That is actually the preferred way now, though
there are still instances of assoc-ref.

I believe the commit in question is
<https://git.savannah.gnu.org/cgit/guix.git/commit?id=7d873f194ca69d6096d28d7a224ab78e83e34fe1>.

> 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?
>

Though perhaps you are getting at that you'd expect the older way to
still work? Perhaps qt-build purposefully left the older procedure
behind as it should have much fewer dependents (which may rely on the
old assoc-ref)?

Hope that helps! The short of it is to use gexps :)

John



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments
  2024-12-05  6:18 ` John Kehayias via Development of GNU Guix and the GNU System distribution.
@ 2024-12-05  7:35   ` Rutherther
  0 siblings, 0 replies; 3+ messages in thread
From: Rutherther @ 2024-12-05  7:35 UTC (permalink / raw)
  To: John Kehayias; +Cc: guix-devel


Hi John,
thanks.

> You should be able to use gexps, e.g. #$output (see
> <https://guix.gnu.org/manual/devel/en/html_node/G_002dExpressions.html>
> for more details). That is actually the preferred way now, though
> there are still instances of assoc-ref.

> I believe the commit in question is
> <https://git.savannah.gnu.org/cgit/guix.git/commit?id=7d873f194ca69d6096d28d7a224ab78e83e34fe1>.

I've seen this commit before and saw that many of the build systems
in it had the inputs and outputs build variables added, so that's why I asked.

> Though perhaps you are getting at that you'd expect the older way to
> still work? Perhaps qt-build purposefully left the older procedure
> behind as it should have much fewer dependents (which may rely on the
> old assoc-ref)?

Yes, exactly, I wanted to know if this is purposefully left out, ie. for
the thing you are saying - less dependants, or if it was sort of a
mistake.

So is the goal to port everything to gexps eventually, and to get
rid of %outputs completely? 

Regards,
Rutherther


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-05  7:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 22:17 [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments Rutherther
2024-12-05  6:18 ` John Kehayias via Development of GNU Guix and the GNU System distribution.
2024-12-05  7:35   ` Rutherther

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).