From: mlell@posteo.de
To: sirgazil <sirgazil@zoho.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: How can I replace Python venv and pip with Guix?
Date: Tue, 04 Feb 2020 15:31:07 +0100 [thread overview]
Message-ID: <6246e5281a43e838e35347f8413d6ed4@posteo.de> (raw)
In-Reply-To: <1701049401d.1293b0e6720556.5375911807886978669@zoho.com>
Hi sirgazil,
> Well, the profile is created and persists, but, after deactivating the
> environment, how do I start an environment that uses that profile?
>
If you want to use the isolation features of `guix environment`, like
running inside a container,
you can just use the same command that you used for creating the
profile. Guix will not rebuild
anything because all derivations are already in the store from the first
time you executed this,
so
guix environment --pure --manifest=guix.scm
--root=/path/to/my-guix-envs/my-project
Otherwise, you can use the standard way that you can use to load any
GUIX profile: You source
the <profile>/etc/profile file into your shell:
GUIX_PROFILE="/path/to/my-guix-envs/my-project"; .
"$GUIX_PROFILE"/etc/profile
The dot is the shell command `source`. It defines the nessecary
environment variables like PATH.
Defining the variable GUIX_PROFILE has the effect thatyou always access
the newest generation of the
profile. If you update your profile while your shell is running, you
automatically access the files
of the new generation. Read the source code of $GUIX_PROFILE/etc/profile
for more info.
As a general note, the use case of `guix environment` is to debug how a
specific program is built
by GUIX. For example, if you want to enter the environment that GUIX
creates for the building of
GNU hello, you call `guix environment hello`. You enter a profile with
the *dependencies* of hello
which you can then try to build yourself. If you just want to create a
profile following a manifest
file, just use
guix package --manifest="your-manifest.scm" -p
/path/to/profile-folder
That said, the containerization features of `guix environment` can be
handy in other cases, too.
Cheers, Moritz
next prev parent reply other threads:[~2020-02-04 14:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-02 23:00 How can I replace Python venv and pip with Guix? sirgazil
2020-02-04 7:36 ` Moritz Lell
2020-02-04 13:00 ` sirgazil
2020-02-04 14:31 ` mlell [this message]
2020-02-04 18:09 ` sirgazil
2020-02-04 7:59 ` Tanguy Le Carrour
2020-02-04 14:26 ` sirgazil
2020-02-04 14:02 ` Ricardo Wurmus
2020-02-04 18:13 ` sirgazil
[not found] <mailman.91.1580749212.18219.help-guix@gnu.org>
2020-02-03 21:09 ` Zelphir Kaltstahl
2020-02-03 22:56 ` sirgazil
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=6246e5281a43e838e35347f8413d6ed4@posteo.de \
--to=mlell@posteo.de \
--cc=help-guix@gnu.org \
--cc=sirgazil@zoho.com \
/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).