From: Thiago Jung Bauermann <bauermann@kolabnow.com>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: help-guix@gnu.org
Subject: Re: help with use of %current-target-system parameter and gexps
Date: Mon, 16 Aug 2021 16:30:19 -0300 [thread overview]
Message-ID: <2198298.QmL5SxD5ED@popigai> (raw)
In-Reply-To: <87fsvb8cu5.fsf@gnu.org>
Hello Mathieu,
Em domingo, 15 de agosto de 2021, às 03:02:42 -03, Mathieu Othacehe
escreveu:
> > + ;; LuaJIT is not ported to powerpc64le* yet.
> > + (if (string-prefix? "powerpc64le"
> > + (or (%current-target-system)
> > + (%current-system)))
> > + (substitute* fmtutilcnf
> > + (((string-append
> > "^(luajittex|luajithbtex|mfluajit)") m) +
> > (string-append "#! " m))))
> >
> > ;; Register SHARE as TEXMFROOT in texmf.cnf.
> > (substitute* texmfcnf
> >
> > (("TEXMFROOT = \\$SELFAUTOPARENT")
>
> The issue here is that the %current-target-system and %current-system
> are not defined at build time. You need to force their evaluation by
> using "unquote", this way:
Ah! I wasn’t aware of that trick. It indeed solved the problem. Thank you
very much for your help!
> --8<---------------cut here---------------start------------->8---
> (arguments
> `(#:phases
‘texlive-texmf’ already has this quasiquote, so I only needed the unquote
below to make it work.
> ...
> (if (string-prefix? "powerpc64le"
> ,(or (%current-target-system)
> (%current-system)))
> ...)))
> --8<---------------cut here---------------end--------------->8---
>
> > + #~(let-system (system target)
> > + ;; LuaJIT is not ported to powerpc64le* yet.
>
> Here also you need to unquote this part, using "ungexp":
>
> --8<---------------cut here---------------start------------->8---
> #$(let-system (system target)
> ...
> --8<---------------cut here---------------end--------------->8---
Not that it matters anymore, but just for completeness: unfortunately
I couldn’t make this one work. When I used “ungexp”, I got this error:
--8<---------------cut here---------------start------------->8---
[ 79%] GUILEC gnu/packages/tex.go
gnu/packages/tex.scm:6832:24: warning: possibly unbound variable `substitute*'
gnu/packages/tex.scm:6832:24: warning: possibly unbound variable `fmtutilcnf'
gnu/packages/tex.scm:6833:27: warning: possibly unbound variable `m'
Compiling Scheme modules...
Compiling Scheme modules...
make[2]: Saindo do diretório '/home/debian/src/guix'
make[1]: Saindo do diretório '/home/debian/src/guix'
gnu/packages/tex.scm:6832:24: error: substitute*: unbound variable
hint: Did you forget `(use-modules (guix build utils))'?
--8<---------------cut here---------------end--------------->8---
I tried using this at the beginning of the gexp:
--8<---------------cut here---------------start------------->8---
(with-imported-modules '((guix build utils))
#~(begin
(use-modules ((guix build utils)))
⋮
--8<---------------cut here---------------end--------------->8---
But it still resulted in the same error. But no problem, your “unquote”
solution worked.
--
Thanks,
Thiago
prev parent reply other threads:[~2021-08-16 19:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-14 18:18 help with use of %current-target-system parameter and gexps Thiago Jung Bauermann
2021-08-15 6:02 ` Mathieu Othacehe
2021-08-16 19:30 ` Thiago Jung Bauermann [this message]
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=2198298.QmL5SxD5ED@popigai \
--to=bauermann@kolabnow.com \
--cc=help-guix@gnu.org \
--cc=othacehe@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.
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).