Subject: [bug#49169] [PATCH 00/11] Removing input labels from package definitions

From: Ludovic Courtès <[email-masked]>
Date: Sun, 11 Jul 2021 01:15:33 +0200

Hi again,

Sarah Morgensen <[email-masked]> skribis:

> diff --git a/guix/import/utils.scm b/guix/import/utils.scm
> index d817318a91..5075e5c491 100644
> --- a/guix/import/utils.scm
> +++ b/guix/import/utils.scm
> @@ -237,12 +237,10 @@ into a proper sentence and by using two spaces between sentences."
>  optional OUTPUT, tries to generate a quoted list of inputs, as suitable to
>  use in an 'inputs' field of a package definition."
>    (define (make-input input version)
> -    (cons* input (list 'unquote (string->symbol
> -                                 (if version
> -                                     (string-append input "-" version)
> -                                     input)))
> -           (or (and output (list output))
> -               '())))
> +    (let ((name (if version (string-append input "-" version) input)))
> +      (if output
> +          (list (string->symbol name) output)
> +          (string->symbol name))))
>  
>    (map (match-lambda
>           ((input version) (make-input input version))
> @@ -263,7 +261,7 @@ snippet generated is for regular inputs."
>        (()
>         '())
>        ((package-inputs ...)
> -       `((,field-name (,'quasiquote ,package-inputs)))))))
> +       `((,field-name (list ,@package-inputs)))))))
>  
>  (define* (maybe-native-inputs package-names #:optional (output #f))
>    "Same as MAYBE-INPUTS, but for native inputs."

On closer inspection, it seems that this change would affect the Crate
importer.  Unfortunately, Crate packages live in their own world and are
unaffected by package input simplification.

This is unfortunate, also because they probably never even use input
labels that can be seen in #:cargo-development-inputs and the likes.

That said, it would be good to simplify that too, and I’m open to
suggestions on how to achieve that!

Ludo’.