[Top][All Lists]

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

Adding a subcommand "load-profile"

From: Roel Janssen
Subject: Adding a subcommand "load-profile"
Date: Tue, 28 Apr 2020 17:42:53 +0200
User-agent: Evolution 3.34.4 (3.34.4-1.fc31)

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

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


reply via email to

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