Subject: Re: [bug#54595] [PATCH v2 2/2] gnu: libfido2: Fix cross-compilation.

From: Maxime Devos <[email-masked]>
Date: Sun, 27 Mar 2022 16:09:03 +0200

Sébastien Lerique schreef op zo 27-03-2022 om 22:00 [+0900]:
> +     `(#:configure-flags (list ,@(if (%current-target-system)
> +                                     `((string-append
> +                                        "-DPKG_CONFIG_EXECUTABLE="
> +                                        (search-input-file %build-inputs
> +                                                           (string-append
> +                                                            "/bin/"
> +                                                            ,(pkg-config-for-target)))))
> +                                     '()))

'pkg-config-for-target' just returns "pkg-config" when compiling
natively, so the 'if' can be dropped here and the "-
DPKG_CONFIG_EXECUTABLE=..." be made unconditional.

For clarity, I would put the 'list' on a separate line, though for
style reasons that might require removing the quasiquote and turning it
in a 'list': (arguments (list #:phases #~(foo ...) #:configure-flags
#~(bar ... #$(pkg-config-for-target)))).

Greetings,
Maxime.