[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: branch master updated: gnu: Add warsow-qfusion.
From: |
Marius Bakke |
Subject: |
Re: branch master updated: gnu: Add warsow-qfusion. |
Date: |
Tue, 05 May 2020 18:34:47 +0200 |
User-agent: |
Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) |
Pierre Neidhardt <address@hidden> writes:
> Marius Bakke <address@hidden> 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.
signature.asc
Description: PGP signature