Hi Josselin,

Josselin Poiret <d...@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’.

Reply via email to