Open Cauch-BS opened 4 weeks ago
Much like before, it seems devbox shell --pure
fails because it assumes that the store PATH is under /nix/store
.
(See this issue)
As it my relevant, I also share my .bashrc
files
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
export CUDA_DEVICE_ORDER=PCI_BUS_ID
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
#>>> cargo initialize >>>
export PATH="$HOME/.cargo/bin:$PATH"
#>>>QOL Improvements >>>
#setup eza
alias ls="eza --color=always --long --git --icons=always\
--no-filesize --no-time --no-user --no-permissions\
--sort=extension"
#some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias lde='ls --tree --level=2'
#setup starship
eval "$(starship init bash)"
#setup neovim
export PATH="$HOME/.local/share/bob/nvim-bin:$PATH"
alias vim="nvim"
# Define the `link` function
link() {
if [ $# -eq 0 ] || [ $# -gt 2 ]; then
echo "Usage: link <source_file> [target_directory]"
return 1
fi
source_file="$1"
if [ $# -eq 1 ]; then
target_dir="."
echo "Target directory not specified. Using current directory."
else
target_dir="$2"
fi
target_file="${target_dir}/$(basename "$source_file")"
ln -s "$source_file" "$target_file"
echo "Created symbolic link: $target_file -> $source_file"
}
#setup fzf
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
#setup zoxide
eval "$(zoxide init bash)"
alias cd='z'
# Mamba initialization
if [ -f "/home/catbase/.local/bin/micromamba" ] && [ -d "/home/catbase/micromamba" ]; then
# >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba init' !!
export MAMBA_EXE='/home/catbase/.local/bin/micromamba';
export MAMBA_ROOT_PREFIX='/home/catbase/micromamba';
__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
alias micromamba="$MAMBA_EXE" # Fallback on help from mamba activate
fi
unset __mamba_setup
# <<< mamba initialize <<<
else
echo "Mamba files not found. Skipping mamba initialization."
fi
# Conda initialization
if [ -d "$CONDA_PATH" ] && [ -f "$CONDA_PATH/bin/conda" ]; then
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$("$CONDA_PATH/bin/conda" 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "$CONDA_PATH/etc/profile.d/conda.sh" ]; then
. "$CONDA_PATH/etc/profile.d/conda.sh"
else
export PATH="$CONDA_PATH/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
else
echo "Conda files not found. Skipping conda initialization."
fi
alias mamba='micromamba'
What happened?
devbox shell
executed without any issues. However, when runningdevbox shell --pure
I got the following error message:Error: fork/exec /nix/store/5q96kfjc8bxwv89fw0fqczwr6083ny8n-bash-interactive-5.2-p15/bin/bash: no such file or directory
I added the
bash@latest
flag topackages
to see if it would resolve the issue. However, it did not work.Searching for a similar issue I found this but this was not very helpful.
Additional Context My Shell:
bash 5.1.16(1)-release
My Operating System:Ubuntu 22.04 LTS
Steps to reproduce
I followed the following steps:
install
script to supportnon-root
install: See this issue , and my script belownix-portable
and bound thenix
-binary via symbolic link, as discussed in nix-portable and this issueAs this issue was closed and resolved as of the release v0.10.0, I assumed that I could continue with non-root install.
devbox init
anddevbox shell
to check if devbox was working. These executed without issue.devbox shell --pure
which is when I got the error.Installation Script
devbox.json
devbox.lock
:Devbox version
0.12.0
Nix version
nix (Nix) 2.20.6
What system does this bug occur on?
Linux (x86-64)
Debug logs