Subject: [bug#51440] [PATCH 04/10] gnu: guile-netlink: Allow cross-compilation.

From: Julien Lepiller <[email-masked]>
Date: Thu, 28 Oct 2021 02:58:40 +0200

Le Wed, 27 Oct 2021 16:02:39 +0200,
Ludovic Courtès <[email-masked]> a écrit :

> * gnu/packages/guile-xyz.scm (guile-netlink)[arguments]: Add #:phases.
> Remove unnecessary #:tests? #f.
> [native-inputs]: Add GUILE-3.0.
> ---
>  gnu/packages/guile-xyz.scm | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
> index 355b23f57e..daef8bbb26 100644
> --- a/gnu/packages/guile-xyz.scm
> +++ b/gnu/packages/guile-xyz.scm
> @@ -4854,13 +4854,22 @@ (define-public guile-netlink
>           "03zmsha2d7whlwb52gna83jdas9bqi18rq3sss7kkicv814qb35g"))))
>      (build-system gnu-build-system)
>      (arguments
> -     `(#:tests? #f)); no tests
> +     `(#:phases (modify-phases %standard-phases
> +                  (add-before 'bootstrap 'set-guile-target
> +                    (lambda* (#:key target #:allow-other-keys)
> +                      (when target
> +                        ;; Pass '--target=TRIPLET' to 'guild
> compile'.
> +                        (substitute* "guile.am"
> +                          (("\\$\\(GUILD\\) compile")
> +                           (string-append "$(GUILD) compile
> --target="
> +                                          target " ")))))))))
>      (inputs
>       `(("guile" ,guile-3.0)))
>      (native-inputs
>       `(("automake" ,automake)
>         ("autoconf" ,autoconf)
>         ("pkg-config" ,pkg-config)
> +       ("guile" ,guile-3.0)                    ;for 'guild compile'
> + guile.m4 ("texinfo" ,texinfo)))
>      (home-page "https://git.lepiller.eu/guile-netlink")
>      (synopsis "Netlink protocol implementation for Guile")

Is there anything I can do as the author of guile-netlink to allow
cross-compilation?