The output from `conda shell.bash hook` seems to be based on `/etc/profile.d/conda.sh`:
As in, it prefixes some environment variables and appends the activation of the base environment.
Now if we replace all 5 occurances of
"$CONDA_EXE" $_CE_M $_CE_CONDA
in that file with
bash --norc -i "$CONDA_EXE" $_CE_M $_CE_CONDA
then everything works as expected.
The -i is to enable interactive mode, preventing PS1 from being eaten. --norc is necessary to not source .bashrc.
There are two occurences of "$CONDA_EXE" that should not be replaced, hence adding the CE variables.
Would editing files like that be possible in a guix package script?
It seems that it is only a simple sed replace on a single file. It is a bit hackish, because it adds knowledge to the package that a) there is a wrapper script and b) it is in bash.
I have only experimented with it by copying the output off `conda shell.bash hook` to a file in my home directory and editing that. Maybe I can try to update the package too.
- Use some other sh than bash, one that does not eat PS1, (e.g. dash) as wrapper script. I just verified that *all* wrappers on my machine are bash. However, some are using bash-minimal, so that means that there is a choice, so maybe switching shells is possible?
- Somehow let conda work with another variable than PS1. Seems more complicated.
Then what is left is updating `conda init` such that
- it doesn't complain when it cannot edit files
- it only uses paths in ~/.guix-profile
but this is not essential to get conda to work.