all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xinglu Chen <public@yoctocell.xyz>
To: Pierre-Antoine Bouttier
	<Pierre-Antoine.Bouttier@univ-grenoble-alpes.fr>,
	help-guix <help-guix@gnu.org>
Subject: Re: nix shellHook equivalent for guix environment?
Date: Wed, 10 Mar 2021 16:03:14 +0100	[thread overview]
Message-ID: <87eegnhwzx.fsf@yoctocell.xyz> (raw)
In-Reply-To: <7663A078-15A7-41AC-BBAB-AED626151B15@univ-grenoble-alpes.fr>

Hi!

On Tue, Mar 09 2021, Pierre-Antoine Bouttier wrote:

> Dear all,
>
> Do you know if there is any equivalent to shellHook, available for the
> nix-shell command, for setting up a guix environment through a
> manifest.scm file?
>
> Or maybe another methodology with guix to have approximatively the
> same behavior? (i.e. in a file that can be put under version control,
> defining dependancies and also init commands to set up a guix
> environment)

I am not aware of a guix environment equivalent to shellHook, but I
suggest you checking out direnv[1].  It allows you to setup an
environment on a per-directory basis, everytime you enter a directory
the content of the `.envrc` file will be run in your shell.

There is also integration with Guix[2] so you could have an `.envrc`
file like this:

--8<---------------cut here---------------start------------->8---
use_guix <some-package> --ad-hoc git -L manifest.scm

echo "Environment created!"

[...]
--8<---------------cut here---------------end--------------->8---

[1] https://direnv.net/
[2] https://github.com/direnv/direnv/wiki/GNU-Guix

--
Xinglu Chen


  parent reply	other threads:[~2021-03-10 22:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 16:23 nix shellHook equivalent for guix environment? Pierre-Antoine Bouttier
2021-03-10 14:07 ` zimoun
2021-03-11  6:57   ` Pierre-Antoine Bouttier
2021-03-10 15:03 ` Xinglu Chen [this message]
2021-03-11  6:58   ` Pierre-Antoine Bouttier

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

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

  git send-email \
    --in-reply-to=87eegnhwzx.fsf@yoctocell.xyz \
    --to=public@yoctocell.xyz \
    --cc=Pierre-Antoine.Bouttier@univ-grenoble-alpes.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.