When vox was activated after apipenv, then opening a new shell in a folder with a Pipfile resulted in calls to vox before the xontrib had been loaded. This resulted in improper error messages about missing the vox program and meant the Pipenv was not auto-loading in that folder. By moving activation of vox before these other xontribs, those xontribs can make use of vox internally
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
# vim: set ft=python:
|
|
from os import getcwd, uname
|
|
from pathlib import Path
|
|
from sys import platform
|
|
|
|
|
|
#if uname().sysname == 'Darwin' and ('__NIX_DARWIN_SET_ENVIRONMENT_DONE' not in ${...} or not $__NIX_DARWIN_SET_ENVIRONMENT_DONE):
|
|
# source-bash /etc/bashrc
|
|
|
|
# set -e == $RAISE_SUBPROC_ERROR = True
|
|
# set -x == trace on; $XONSH_TRACE_SUBPROC = True
|
|
# $? == _.rtn
|
|
|
|
|
|
# Does virtualenv support
|
|
xontrib load vox
|
|
# Faster coreutils
|
|
xontrib load coreutils
|
|
xontrib load direnv
|
|
xontrib load coreutils
|
|
xontrib load xonsh-apipenv
|
|
$APIPENV="1"
|
|
|
|
# Insert to the front, because when we spawn xonsh in tmux we have raw python3
|
|
# paths added before these. That ends up screwing with finding the python3 version
|
|
# with all of our dependencies that we want
|
|
$PATH.insert(0, Path("~/.nix-profile/bin").expanduser())
|
|
$PATH.insert(0, Path("~/src/bin").expanduser())
|
|
$PATH.insert(0, Path("~/.local/bin").expanduser())
|
|
|
|
if platform == "darwin":
|
|
$PATH.append(Path("/opt/homebrew/bin/"))
|
|
$PATH.append(Path("/run/current-system/sw/bin"))
|
|
$PATH.append(Path("/nix/var/nix/profiles/default/bin"))
|
|
$PATH.append(Path("/usr/local/bin"))
|