all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / Atom feed
From: Roel Janssen <roel@gnu.org>
To: guix-devel@gnu.org
Subject: Adding a subcommand "load-profile"
Date: Tue, 28 Apr 2020 17:42:53 +0200	[thread overview]
Message-ID: <490f77b9f9b0829f985ba717f6fbe008f54a816d.camel@gnu.org> (raw)

Dear Guix,

Years ago we implemented GNU Guix on the high-performance computing cluster in
Utrecht.  One of the things we added was a wrapper around the "guix" command
(called "guixr") to enable communication between the guix-daemon (on one node),
and the client-side "guix" command.  (We actually copied the great "guixr"
script from Ricardo at the time.)

Lots of improvements have been made for the HPC use-case that the need for the
"guixr" wrapper script is no longer needed.   Except for one thing.

We added a subcommand in the "guixr" script called "load-profile".  It allows a
user to do the following:
--------------------------------------------------------------------------------
$ guixr package -i ... -p /my/profile
$ guixr load-profile /my/profile
[env]$
  # ... A new shell is spawned here.
  #     Inside this shell only the environment variables in
  #     /my/profile/etc/profile are set ...
[env]$ exit
  # Return to the normal shell state 
--------------------------------------------------------------------------------

The code of "guixr" is available at [1].

I sometimes wish I had this command available in "guix" itself.  So I'd like to
implement the "load-profile" subcommand in Scheme, so that it can be part of
Guix.

Would there be any interest from others to have this as well? And also, the
shell implementation heavy relies on Bash.  What other shells should I attempt
to implement?

If there is interest in having this as a "load-profile" subcommand, I will post
an initial implementation to the mailing list ASAP.

Thanks all!

Kind regards,
Roel Janssen

[1] 
https://github.com/UMCUGenetics/guix-additions/blob/master/umcu/packages/guix.scm#L191-L339

             reply	other threads:[~2020-04-28 15:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 15:42 Roel Janssen [this message]
2020-04-28 16:54 ` zimoun
2020-04-29 12:47   ` Roel Janssen
2020-04-29 13:48     ` zimoun
2020-04-29 19:14       ` Roel Janssen
2020-04-28 17:34 ` sirgazil
2020-05-03 20:31   ` Ludovic Courtès
2020-05-03 20:56     ` Vagrant Cascadian
2020-05-04 13:36       ` zimoun
2020-05-05  8:52       ` Ludovic Courtès
2020-05-04 13:34     ` 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

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

  git send-email \
    --in-reply-to=490f77b9f9b0829f985ba717f6fbe008f54a816d.camel@gnu.org \
    --to=roel@gnu.org \
    --cc=guix-devel@gnu.org \
    --subject='Re: Adding a subcommand "load-profile"' \
    /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

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.