Hi, Maxime Devos writes: > [[PGP Signed Part:Undecided]] > Sébastien Lerique schreef op zo 27-03-2022 om 21:29 [+0900]: >> +                                                            ,(%current-target-system) >> +                                                            "-pkg-config")))) > > This can be simplified with 'pkg-config-for-target': > > #:configure-flags > (list (string-append "-DPKG_CONFIG_EXECUTABLE=" > (search-input-file %build-inputs > (string-append "/bin/" ,(pkg-config-for-target))))) For my own benefit trying to get better at writing gexps, I was wondering how to write in order to remove the %build-inputs reference. I came up with the following: --8<---------------cut here---------------start------------->8--- (arguments (list #:configure-flags #~(list #$@(if (%current-target-system) (list #~(string-append "-DPKG_CONFIG_EXECUTABLE=" #+pkg-config "/bin/" #$(pkg-config-for-target))) '())) #:phases #~(modify-phases %standard-phases ;; regress tests enabled only for debug builds (delete 'check)))) --8<---------------cut here---------------end--------------->8--- Would this a the better way to do this? It looks a bit complex to me so I wonder if there's a simpler way. I'm also not entirely sure if it's #+pkg-config or #$pkg-config, both seem to work, however I thought we should be using #+ for native inputs and #$ for regular inputs. Thanks, Pierre