guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#43458] [PATCH] guix: build: Add a hint for unspecified value


From: Ludovic Courtès
Subject: [bug#43458] [PATCH] guix: build: Add a hint for unspecified value
Date: Fri, 18 Sep 2020 22:35:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Julien Lepiller <julien@lepiller.eu> skribis:

>>From b29a325ef52d402c9618bfe9f02e478134297c0f Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Wed, 16 Sep 2020 23:32:00 +0200
> Subject: [PATCH] guix: build: Add a hint for unspecified value.
                   ^
I tend to use “guix build:” as the prefix for this file.

> * guix/scripts/build.scm (options->things-to-build): Add a hint when we
> cannot build something.

Great idea!

> +      (raise (make-compound-condition
> +               (formatted-message (G_ "~s: not something we can build~%") x)
> +               (condition
> +                (&fix-hint
> +                 (hint
> +                   (if (unspecified? x)
> +                       (G_ "If you build from a file, make sure the last 
> scheme
> +expression returns a package value.  @code{define-public} defines a variable,
> +but returns #<unspecified>.  To fix this, add a scheme expression at the end 
> of
               ^
@code

> +the file that consists only of the package's variable name you defined. ex:

s/. ex:/as in this example:/

> +@example
> +(define-public my-package
> +  (package
> +    ...))
> +
> +my-package
> +@end example")
> +                       (G_ "If you build from a file, make sure the last 
> scheme
> +expression returns a package, gexp, derivation value or a list of such
> +values.")))))))))

s/derivation value/derivation/

Also s/scheme/Scheme/ throughout.

OK with these changes, thank you!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]