unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* developing software with guix environment
@ 2017-07-15 22:22 nee
  2017-07-17 10:01 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: nee @ 2017-07-15 22:22 UTC (permalink / raw)
  To: help-guix

Hello, I've been using guix `environment -l env.scm` to work on
different programming projects on my laptop.
The problem is: When I do guix pull or gc, these environments might get
lost, and when I'm on the train with no network and run `guix
environment` it will try to graft/rebuild/whatever, which requires an
internet connection, instead of just opening the last working environment.
So I can't work on my projects until I get back online.

I don't want to create a new user for each project.
Can I somehow apply guix environment to a new profile per project, so
I'm guaranteed to have it working whenever I run it?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: developing software with guix environment
  2017-07-15 22:22 developing software with guix environment nee
@ 2017-07-17 10:01 ` Ludovic Courtès
  2017-07-17 13:28   ` Adonay Felipe Nogueira
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2017-07-17 10:01 UTC (permalink / raw)
  To: nee; +Cc: help-guix

Hi nee,

nee <nee@cock.li> skribis:

> Hello, I've been using guix `environment -l env.scm` to work on
> different programming projects on my laptop.
> The problem is: When I do guix pull or gc, these environments might get
> lost, and when I'm on the train with no network and run `guix
> environment` it will try to graft/rebuild/whatever, which requires an
> internet connection, instead of just opening the last working environment.
> So I can't work on my projects until I get back online.

To protect your environment from GC, you can use ‘guix environment
--root’: it register a “garbage collector root” for your environment as
a symlink, which means your environment won’t be GC’d unless you remove
that symlink.

To prevent your environment from being updated even if you ran ‘guix
pull’ in the meantime, you can use a separate profile.  For instance,
you can create a ‘dev’ profile for your development environment:

  guix package -p dev -i gcc-toolchain make

and then whenever you want to “enter” that profile, do:

  . ./dev/etc/profile

And of course you can have as many profiles as you want.

HTH!

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: developing software with guix environment
  2017-07-17 10:01 ` Ludovic Courtès
@ 2017-07-17 13:28   ` Adonay Felipe Nogueira
  2017-07-18  9:18     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Adonay Felipe Nogueira @ 2017-07-17 13:28 UTC (permalink / raw)
  To: help-guix

ludo, I'm very new to guix environment, but I'm wondering something:

About "preventing environment from being updated by ‘guix pull’ in the
meantime", do you mean that:

1. Even if I specify the `--root [Some file path.]` option to `guix
   environment`.

2. Exit/leave the environmente due to other stuff.

3. Some days go by, I do `guix pull` (and get updates).

4. Then decide to go back to my environment...

Will `guix environment` try to apply the current set of recipes
available from the last `guix pull` into the environment?

Morever, in this last `guix environment`, will it try to download
things?

I find it interesting because your suggestion to make a separate profile
seems to imply so.

Of course, this is meant to be a friendly message, because I'm just
learning stuff --- like most of those reading. :)

-- 
- [[https://libreplanet.org/wiki/User:Adfeno]]
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre, por isso não uso. Iguais a ele prefiro
  GNU Ring, ou Tox. Quer outras formas de contato? Adicione o vCard
  que está no endereço acima aos teus contatos.
- Pretende me enviar arquivos .doc, .ppt, .cdr, ou .mp3? OK, eu
  aceito, mas não repasso. Entrego apenas em formatos favoráveis ao
  /software/ livre. Favor entrar em contato em caso de dúvida.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: developing software with guix environment
  2017-07-17 13:28   ` Adonay Felipe Nogueira
@ 2017-07-18  9:18     ` Ludovic Courtès
  2017-07-28 13:10       ` Adonay Felipe Nogueira
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2017-07-18  9:18 UTC (permalink / raw)
  To: Adonay Felipe Nogueira; +Cc: help-guix

Hi,

Adonay Felipe Nogueira <adfeno@openmailbox.org> skribis:

> About "preventing environment from being updated by ‘guix pull’ in the
> meantime", do you mean that:
>
> 1. Even if I specify the `--root [Some file path.]` option to `guix
>    environment`.
>
> 2. Exit/leave the environmente due to other stuff.
>
> 3. Some days go by, I do `guix pull` (and get updates).
>
> 4. Then decide to go back to my environment...
>
> Will `guix environment` try to apply the current set of recipes
> available from the last `guix pull` into the environment?

Yes.

> Morever, in this last `guix environment`, will it try to download
> things?

It will try to build or download whatever is missing (perhaps nothing,
perhaps many things.)

I hope this clarifies things!

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: developing software with guix environment
  2017-07-18  9:18     ` Ludovic Courtès
@ 2017-07-28 13:10       ` Adonay Felipe Nogueira
  0 siblings, 0 replies; 5+ messages in thread
From: Adonay Felipe Nogueira @ 2017-07-28 13:10 UTC (permalink / raw)
  To: help-guix

Thank you very much for the information. :)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-28 13:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-15 22:22 developing software with guix environment nee
2017-07-17 10:01 ` Ludovic Courtès
2017-07-17 13:28   ` Adonay Felipe Nogueira
2017-07-18  9:18     ` Ludovic Courtès
2017-07-28 13:10       ` Adonay Felipe Nogueira

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).