Subject: Re: [bug#70131] [PATCH v3 6/6] gnu: u-boot: Use guix-name.

From: Vagrant Cascadian <[email-masked]>
Date: Sun, 15 Dec 2024 00:46:31 -0800

On 2024-12-13, Herman Rimm wrote:
> * gnu/packages/bootloaders.scm (u-boot): Use guix-name.

Triggers build failure:

error: guix-name: unbound variable
hint: Did you forget a `use-modules' form?

error: googletest: unbound variable
hint: Did you forget a `use-modules' form?
...
In unknown file:
          10 (force #<promise #<procedure ffffa6c1b7a0 at gnu/packag…>)
In gnu/packages.scm:
   243:33  9 (fold-packages #<procedure ffffa6228750 at gnu/package…> …)
In guix/discovery.scm:
   158:11  8 (all-modules _ #:warn _)
In srfi/srfi-1.scm:
   460:18  7 (fold #<procedure ffffab39ba40 at guix/discovery.scm:1…> …)
In guix/discovery.scm:
   148:19  6 (_ _ ())
    115:5  5 (scheme-modules _ _ #:warn _)
In srfi/srfi-1.scm:
   691:23  4 (filter-map #<procedure ffffab39b8e0 at guix/discove…> . #)
In guix/discovery.scm:
   123:24  3 (_ . _)
In guix/ui.scm:
    363:2  2 (report-unbound-variable-error _ #:frame _)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `match-error' with args `("match" "no matching pattern"
(unbound-variable "resolve-interface" "no binding `~A' in module ~A"
(shared-mime-info (gnu packages freedesktop)) #f))'.

>
> Change-Id: I7226519a676ba201be3a95078112b6514a201731
> ---
>  gnu/packages/bootloaders.scm | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> index 521e0d5bcd..a0deecbfb5 100644
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -1038,9 +1038,7 @@ (define*-public (make-u-boot-package board triplet
>                                         (gnu-triplet->nix-system triplet))))))
>      (package
>        (inherit u-boot)
> -      (name (string-append "u-boot-"
> -                           (string-replace-substring (string-downcase board)
> -                                                     "_" "-")
> +      (name (string-append (guix-name "u-boot-" board)
>                             (or name-suffix "")))
>        (description (if append-description
>                         (string-append (package-description u-boot)
> -- 
> 2.45.2

live well,
  vagrant