Message ID | 20220327130004.533714-2-sl@eauchat.org |
---|---|
State | Accepted |
Headers | show |
Series | [bug#54595,v2,1/2] gnu: libfido2: Use new style. | expand |
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.
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm index 6853d5bc9e..db8a8a53d3 100644 --- a/gnu/packages/security-token.scm +++ b/gnu/packages/security-token.scm @@ -44,6 +44,7 @@ (define-module (gnu packages security-token) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system python) + #:use-module (guix utils) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages curl) @@ -906,7 +907,15 @@ (define-public libfido2 (inputs (list zlib eudev libcbor openssl)) (build-system cmake-build-system) (arguments - '(#:phases + `(#:configure-flags (list ,@(if (%current-target-system) + `((string-append + "-DPKG_CONFIG_EXECUTABLE=" + (search-input-file %build-inputs + (string-append + "/bin/" + ,(pkg-config-for-target))))) + '())) + #:phases (modify-phases %standard-phases ;; regress tests enabled only for debug builds (delete 'check))))