unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Philippe SWARTVAGHER <philippe.swartvagher@inria.fr>
To: help-guix@gnu.org
Subject: Re: Package variant defined in manifest not visible by Guix
Date: Wed, 18 Aug 2021 10:57:39 +0200	[thread overview]
Message-ID: <292c1173-3ff6-47b0-2da0-487ef491a133@inria.fr> (raw)
In-Reply-To: <87eeath300.fsf@elephly.net>

Hello,

Le 16/08/2021 à 16:34, Ricardo Wurmus a écrit :
> There seems to be a small misunderstanding.  You defined a package
> variant, but that’s not a manifest.  A manifest describes the complete
> contents of a profile; i.e. it’s a list of packages that Guix should
> install.
>
> Here are three different ways that should work for you:
>
> 1) Build a single package from a file.
>
> Now we can build the package specified in the file:
>
>    guix build --file=this-file.scm
>
>
> 2) Build a whole manifest from a file.
>
> Here the file must evaluate to a manifest value, not just a single
> package.

Ok, I was missing the line to evaluate to a manifest, instead of a
single package.


> Then build the profile from the manifest file:
>
>    guix build --manifest=this-file.scm
>
>
> 3) Create a module and use it however you want.
>
> You can make the custom package available to any Guix command by
> putting it into a Guile module and then informing Guix about the
> module.  This is a little more effort as you need more boilerplate
> code to define the module (and the file name needs to match the moule
> header, etc).
>
> Hope this helps!

Sure, it helps ! Thanks a lot ! However, I still have some questions:

- I don't really see the difference, or more precisely: the difference
of goal, between defining the package in a simple file (solution 1) and
using a manifest (solution 2).

- The following command builds the package as defined in the *file*,
without running tests:

guix build -c 2 -f starpu-maxnodes1-file.scm
--without-tests=starpu-maxnodes1

So package transformations seem to work. However:

guix build -c 2 -f starpu-maxnodes1-file.scm chameleon
--with-input=starpu=starpu-maxnodes1 --with-input=openblas=mkl
--without-tests=starpu-maxnodes1

doesn't work: starpu-maxnodes1 is an unknown package...

The same happens if I use a manifest instead of a file to define
starpu-maxnodes1:

guix build -c 2 -m starpu-maxnodes1.scm --with-input=openmpi=nmad
--without-tests=starpu-maxnodes1

works (without running tests), however:

guix build -c 2 -m starpu-maxnodes1.scm chameleon
--with-input=starpu=starpu-maxnodes1 --with-input=openblas=mkl
--with-input=openmpi=nmad --without-tests=starpu-maxnodes1

doesn't.

I guess I have to put all transformations of several packages in a
single manifest, one cannot combine manifest and CLI options; packages
defined in manifest aren't available for use in CLI transformations
(although the working --without-tests seems to be a counter argument).
Am I right ?

Thanks again for your help !

-- 
Philippe SWARTVAGHER

PhD Student
TADaaM team, Inria Bordeaux Sud-Ouest




  parent reply	other threads:[~2021-08-18  8:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16  8:08 Package variant defined in manifest not visible by Guix Philippe SWARTVAGHER
2021-08-16 12:04 ` Efraim Flashner
2021-08-16 14:34 ` Ricardo Wurmus
2021-08-17  7:17   ` zimoun
2021-08-18  8:57   ` Philippe SWARTVAGHER [this message]
2021-08-18 13:21     ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=292c1173-3ff6-47b0-2da0-487ef491a133@inria.fr \
    --to=philippe.swartvagher@inria.fr \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).