Subject: [bug#37868] [PATCH] guix: Allow multiple packages to provide Linux modules in the system profile.

From: Ludovic Courtès <[email-masked]>
Date: Tue, 18 Feb 2020 09:31:06 +0100

Hi,

Danny Milosavljevic <[email-masked]> skribis:

> guix system: error: #<procedure 7f990dded140 at guix/profiles.scm:1538:2 (state)>: invalid G-expression input

That means you’re using a procedure in a gexp, as in:

  #~(foo bar #$proc)

where ‘proc’ is a procedure.

Given the location info and argument name, we can tell that procedure
comes from ‘profile-derivation’, right…

>      (mlet %store-monad ((kernel -> (operating-system-kernel os))
> +                        (kernel-module-packages ->
> +                         (operating-system-kernel-module-packages os))
>                          (initrd -> (operating-system-initrd-file os))
>                          (params    (operating-system-boot-parameters-file os)))
>        (return `(("kernel" ,kernel)
> +                ("kernel-modules"
> +                 ,(profile-derivation
> +                   (packages->manifest (cons kernel kernel-module-packages))

… here.  ↑

This is because ‘profile-derivation’ is a monadic procedure, so it’s
result is a “monadic value”, which is technically a procedure.

You need to move the ‘profile-derivation’ call within the ‘mlet’.

HTH!

Ludo’.