From: "Ludovic Courtès" <ludo@gnu.org>
To: Josselin Poiret <dev@jpoiret.xyz>
Cc: guix-devel@gnu.org
Subject: Re: Deprecating legacy build phase style when cross-compiling vs. native
Date: Fri, 01 Apr 2022 11:02:25 +0200 [thread overview]
Message-ID: <87tubdnplq.fsf@gnu.org> (raw)
In-Reply-To: <874k3fh3m8.fsf@jpoiret.xyz> (Josselin Poiret's message of "Wed, 30 Mar 2022 17:17:03 +0200")
Hi Josselin,
Josselin Poiret <dev@jpoiret.xyz> skribis:
> Looking at guix/build-system/gnu.scm [2], we have gnu-build
> vs. gnu-cross-build, which are responsible for native vs. cross-builds.
> The former uses with-build-variables to set the legacy build variables
> such as %output and %outputs (see the def in guix/gexp.scm), whereas the
> latter does not, only doing so manually and so omitting %output.
‘%output’ (singular) had long been informally deprecated in favor of
‘%outputs’ (plural).
> This means that packages that were not updated to fit the new style
> should all fail to cross-compile. This simple bug could be resolved by
> adding %output to gnu-cross-build, however as was argued on IRC this is
> now undocumented behaviour and we'd rather switch all packages to the
> new style instead. While I 100% agree with this, I think we should have
> a uniform deprecation policy for this matter, and that there shouldn't
> be such a disparity between cross and native builds.
The easiest change is to replace:
%output
with:
(assoc-ref %outputs "out")
It’s a simple search-and-replace.
The next step would be to use gexps and #$output, but that can be done
incrementally over time IMO.
WDYT?
Thanks,
Ludo’.
next prev parent reply other threads:[~2022-04-01 9:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 15:17 Deprecating legacy build phase style when cross-compiling vs. native Josselin Poiret
2022-03-30 17:18 ` Maxime Devos
2022-03-30 17:22 ` Maxime Devos
2022-04-01 9:02 ` Ludovic Courtès [this message]
2022-04-01 10:26 ` Daniel Meißner
2022-04-01 11:46 ` Maxime Devos
2022-04-05 12:14 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tubdnplq.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=dev@jpoiret.xyz \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).