unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Pierre Neidhardt <mail@ambrevar.xyz>, guix-devel@gnu.org
Subject: Re: branch master updated: gnu: Add warsow-qfusion.
Date: Tue, 05 May 2020 18:34:47 +0200	[thread overview]
Message-ID: <87k11qz6fs.fsf@devup.no> (raw)
In-Reply-To: <871ro2cnue.fsf@ambrevar.xyz>

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> Marius Bakke <mbakke@fastmail.com> writes:
>
>>>> +  (let ((commit "c4de15df559410aff0ca6643724e24cddb0ecbbd")
>>>> +        (arch (match (or (%current-target-system)
>>>> +                         (%current-system))
>>>> +                ("x86_64-linux" "x86_64")
>>>> +                ("i686-linux" "i386")
>>>> +                (_ ""))))
>>>> Don't do this if you just need to determine architecture at build time.
>>>
>>> Just to be sure, you suggest moving this inside the 'really-install
>>> phase, right?
>>
>> Yes.  Otherwise it gets needlessly evaluated by the Guix "front-end"
>> every time one uses 'guix search' etc -- even on unsupported
>> architectures.  It's better to do it at build time, especially when it
>> is only used within a single phase.
>
> I don't understand the difference.
>
> (match (or (%current-target-system)
>            (%current-system))
>    ("x86_64-linux" "x86_64")
>    ("i686-linux" "i386"))
>
> must be unquoted inside the phase, so it's evaluated when the package
> is and not at build time, isn't it?
>
> Else how do you match against the build architecture at build time?

You can use (lambda* (#:key target system #:allow-other-keys)) to access
those variables at build time.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2020-05-05 16:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200502135735.22136.31429@vcs0.savannah.gnu.org>
2020-05-02 14:44 ` branch master updated: gnu: Add warsow-qfusion Marius Bakke
2020-05-02 14:53   ` Pierre Neidhardt
2020-05-02 15:17     ` Marius Bakke
2020-05-02 15:45       ` Pierre Neidhardt
2020-05-05 16:37         ` Marius Bakke
2020-05-02 16:18       ` Pierre Neidhardt
2020-05-05 16:34         ` Marius Bakke [this message]
2020-05-06  9:01           ` Pierre Neidhardt

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=87k11qz6fs.fsf@devup.no \
    --to=mbakke@fastmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mail@ambrevar.xyz \
    /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).