Subject: [bug#78301] [PATCH] gnu: guile-mqtt: Patch extension path.

From: Z572 <[email-masked]>
Date: Wed, 07 May 2025 23:29:27 +0800

Evgeny Pisemsky <[email-masked]> writes:

> * gnu/packages/guile-xyz.scm (guile-mqtt): Patch extension path.
> [arguments]: Add 'patch-extension-path phase.
>
> Change-Id: Ifbbd0adebcf82a36f674ab3fded3db5ba04b98b0
> ---
>  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 28a94dc83a..7c6e3ade3e 100644
> --- a/gnu/packages/guile-xyz.scm
> +++ b/gnu/packages/guile-xyz.scm
> @@ -1658,7 +1658,16 @@ (define-public guile-mqtt
>      (build-system gnu-build-system)
>      (arguments
>       (list
> -      #:make-flags #~(list "GUILE_AUTO_COMPILE=0")))
> +      #:make-flags
> +      #~(list "GUILE_AUTO_COMPILE=0")
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'patch-extension-path
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              (substitute* "module/ffi/mosquitto.scm"
> +                (("list #f \"libmosquitto\"")
> +                 (format #f "list #f \"~a/lib/libmosquitto\""
> +                         (assoc-ref inputs "mosquitto")))))))))

please use string-append. else if no "mosquitto" in inputs, The modified
result is "list #f \"#f/lib/libmosquitto\""

>      (native-inputs (list guile-3.0 pkg-config))
>      (inputs (list mosquitto))
>      (home-page "https://github.com/mdjurfeldt/guile-mqtt")
>
> base-commit: ec95c71c01144fcae1a3d079e0d0aec6087b9d2a