unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Hugo Buddelmeijer <hugo@buddelmeijer.nl>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 59771@debbugs.gnu.org
Subject: bug#59771: Conda 22.9.0 needs "sudo" as dependency
Date: Sun, 4 Dec 2022 22:08:16 +0100	[thread overview]
Message-ID: <CA+Jv8O2Ny1TtjGu7MGhqvULPw09Lz5jJj9mHz572oOXMfJ3y4w@mail.gmail.com> (raw)
In-Reply-To: <CA+Jv8O3TaHY42q4hgxXYvdfCq2CKrnu5fEo+4RmCSC8K4k2h2Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

On Sat, 3 Dec 2022 at 20:11, Hugo Buddelmeijer <hugo@buddelmeijer.nl> wrote:

>
> But maybe 59771 (this bug), 59772 (also due to sudo), and 59776 (hardcoded
> paths), all three could be resolved in a more guix-y way. The problem in
> these three bugs is that "conda init" wants to add something to ~/.bashrc
> that adds some bash functions to the environment (and the sole purpose of
> those bash functions seems to be to update PS1). However, I was wondering,
> would it be possible to have guix itself add those bash functions to the
> environment?
>
> As in, we add some code to the guix conda package that ensures that if
> guix enters an environment with conda, that it somehow adds the necessary
> bash functions to the environment. So "conda init" and changes to ~/.bashrc
> would not even be necessary (thus fixing these bugs). That is, that the
> shell spawned through "guix shell -C conda" would have these bash functions
> directly in the environment. Would something like this be possible?
>

No, adding bash functions automatically to a Guix environment seems
impossible. The guile function load-profile allows packages to add
path-like environment variables through the search-path-specification
declaration, but not any other environment variables, let alone shell
functions.

That seems reasonable enough. One reason I'd like to move away from conda
is that I don't think the way conda handles environment variables is
tenable. So maybe it is worthwhile to make sure that "conda init" does what
it is expected to do (that is, add the code that loads these bash functions
to .bashrc), even though it is not really guix-y.

[-- Attachment #2: Type: text/html, Size: 2090 bytes --]

      reply	other threads:[~2022-12-04 21:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 11:36 bug#59771: Conda 22.9.0 needs "sudo" as dependency Hugo Buddelmeijer
2022-12-02 11:47 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-12-03 19:11   ` Hugo Buddelmeijer
2022-12-04 21:08     ` Hugo Buddelmeijer [this message]

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=CA+Jv8O2Ny1TtjGu7MGhqvULPw09Lz5jJj9mHz572oOXMfJ3y4w@mail.gmail.com \
    --to=hugo@buddelmeijer.nl \
    --cc=59771@debbugs.gnu.org \
    --cc=me@tobias.gr \
    /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 public inbox

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

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