help-guix
[Top][All Lists]
Advanced

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

Re: developing software with guix environment


From: Ludovic Courtès
Subject: Re: developing software with guix environment
Date: Mon, 17 Jul 2017 12:01:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi nee,

nee <address@hidden> 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’.



reply via email to

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