help-guix
[Top][All Lists]
Advanced

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

Re: Package variant defined in manifest not visible by Guix


From: zimoun
Subject: Re: Package variant defined in manifest not visible by Guix
Date: Tue, 17 Aug 2021 09:17:09 +0200

Hi Philippe,

On Mon, 16 Aug 2021 at 16:34, Ricardo Wurmus <rekado@elephly.net> wrote:

> 3) Create a module and use it however you want.

[...]

> Put this in a file “my/packages/storm.scm” and then set the 
> GUIX_PACKAGE_PATH environment variable to the directory containing 
> “my” (e.g. $HOME/code/guix/custom containing 
> $HOME/code/guix/custom/my/packages/storm.scm).

Do not miss the CLI option ’--load-path’.  Instead of setting the
environment variable GUIX_PACKAGE_PATH, you can also do:

  guix build --load-path=my/packages/storm.scm <your-variant-package-name>


> Note that you haven’t overridden the “name” field of the original 
> “starpu” package, so on the command line the package cannot be 
> distinguished (unless you use “-e '(@ (my packages storm) 
> starpu-maxnodes1)'”).  Do this to also change the name on the 
> command line:
>
> --8<---------------cut here---------------start------------->8---
> (define starpu-maxnodes1
>   (package
>     (inherit starpu)
>     (name "starpu-maxnodes1")
>     (arguments
>       (substitute-keyword-arguments (package-arguments starpu)
>                                     ((#:configure-flags flags '())
>                                      `(cons "--enable-maxnodes=1" 
>                                      ,flags))))))
> --8<---------------cut here---------------end--------------->8---

In the initial error message, the package is unknown because the package
name ’starpu-maxnodes1’ does not exist, it is the name of the symbol.
And the symbol ’starpu-maxnodes1’ has the name ’starpu’.  Does it make
sense?


Cheers,
simon



reply via email to

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