116 lines
3.6 KiB
Plaintext
116 lines
3.6 KiB
Plaintext
unset shellHook
|
|
PATH=${PATH:-}
|
|
nix_saved_PATH="$PATH"
|
|
XDG_DATA_DIRS=${XDG_DATA_DIRS:-}
|
|
nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS"
|
|
BASH='/noshell'
|
|
HOSTTYPE='x86_64'
|
|
IFS='
|
|
'
|
|
IN_NIX_SHELL='impure'
|
|
export IN_NIX_SHELL
|
|
LINENO='76'
|
|
MACHTYPE='x86_64-pc-linux-gnu'
|
|
NIX_BUILD_CORES='0'
|
|
export NIX_BUILD_CORES
|
|
NIX_STORE='/nix/store'
|
|
export NIX_STORE
|
|
OLDPWD=''
|
|
export OLDPWD
|
|
OPTERR='1'
|
|
OSTYPE='linux-gnu'
|
|
PATH='/path-not-set'
|
|
export PATH
|
|
PS4='+ '
|
|
builder='/nix/store/kbcrs84s1x8yd5bp1nq6q6ihda8nd2lp-bash-interactive-5.2-p15/bin/bash'
|
|
export builder
|
|
dontAddDisableDepTrack='1'
|
|
export dontAddDisableDepTrack
|
|
name='devenv-shell'
|
|
export name
|
|
out='/home/patrick/Sandbox/dhcp/outputs/out'
|
|
export out
|
|
outputs='out'
|
|
shellHook='
|
|
# Remove all the unnecessary noise that is set by the build env
|
|
unset NIX_BUILD_TOP NIX_BUILD_CORES NIX_STORE
|
|
unset TEMP TEMPDIR TMP TMPDIR
|
|
# $name variable is preserved to keep it compatible with pure shell https://github.com/sindresorhus/pure/blob/47c0c881f0e7cfdb5eaccd335f52ad17b897c060/pure.zsh#L235
|
|
unset builder out shellHook stdenv system
|
|
# Flakes stuff
|
|
unset dontAddDisableDepTrack outputs
|
|
|
|
# For `nix develop`. We get /noshell on Linux and /sbin/nologin on macOS.
|
|
if [[ "$SHELL" == "/noshell" || "$SHELL" == "/sbin/nologin" ]]; then
|
|
export SHELL=/nix/store/kbcrs84s1x8yd5bp1nq6q6ihda8nd2lp-bash-interactive-5.2-p15/bin/bash
|
|
fi
|
|
|
|
# https://github.com/numtide/devshell/issues/158
|
|
PATH=${PATH#/path-not-set:}
|
|
|
|
export DEVENV_PROFILE=/nix/store/fd3xw4ffw33w8c70nw5d768ss3sxg211-devenv-profile
|
|
|
|
# add installed packages to PATH
|
|
export PATH="$DEVENV_PROFILE/bin:$PATH"
|
|
|
|
# prepend common compilation lookup paths
|
|
export PKG_CONFIG_PATH="$DEVENV_PROFILE/lib/pkgconfig:${PKG_CONFIG_PATH-}"
|
|
export LD_LIBRARY_PATH="$DEVENV_PROFILE/lib:${LD_LIBRARY_PATH-}"
|
|
export LIBRARY_PATH="$DEVENV_PROFILE/lib:${LIBRARY_PATH-}"
|
|
export C_INCLUDE_PATH="$DEVENV_PROFILE/include:${C_INCLUDE_PATH-}"
|
|
|
|
# these provide shell completions / default config options
|
|
export XDG_DATA_DIRS="$DEVENV_PROFILE/share:${XDG_DATA_DIRS-}"
|
|
export XDG_CONFIG_DIRS="$DEVENV_PROFILE/etc/xdg:${XDG_CONFIG_DIRS-}"
|
|
|
|
export DEVENV_DOTFILE='\''/home/patrick/Sandbox/dhcp/.devenv'\''
|
|
export DEVENV_PROFILE='\''/nix/store/fd3xw4ffw33w8c70nw5d768ss3sxg211-devenv-profile'\''
|
|
export DEVENV_ROOT='\''/home/patrick/Sandbox/dhcp'\''
|
|
export DEVENV_STATE='\''/home/patrick/Sandbox/dhcp/.devenv/state'\''
|
|
export RUST_SRC_PATH='\''/nix/store/8n69a7ralcwkzfxhzm9va5nlj5risdz6-rust-src-stable-2023-04-20/lib/rustlib/src/rust/library'\''
|
|
|
|
|
|
export PS1="\[\e[0;34m\](devenv)\[\e[0m\] ${PS1-}"
|
|
|
|
# set path to locales on non-NixOS Linux hosts
|
|
if [ -z "${LOCALE_ARCHIVE-}" ]; then
|
|
export LOCALE_ARCHIVE=/nix/store/nm00g2nm2wsyh30jvkgi168kh6yvw4sl-glibc-locales-2.37-8/lib/locale/locale-archive
|
|
fi
|
|
|
|
|
|
# note what environments are active, but make sure we don'\''t repeat them
|
|
if [[ ! "${DIRENV_ACTIVE-}" =~ (^|:)"$PWD"(:|$) ]]; then
|
|
export DIRENV_ACTIVE="$PWD:${DIRENV_ACTIVE-}"
|
|
fi
|
|
|
|
# devenv helper
|
|
if [ ! type -p direnv &>/dev/null && -f .envrc ]; then
|
|
echo "You have .envrc but direnv command is not installed."
|
|
echo "Please install direnv: https://direnv.net/docs/installation.html"
|
|
fi
|
|
|
|
mkdir -p .devenv
|
|
rm -f .devenv/profile
|
|
ln -s /nix/store/fd3xw4ffw33w8c70nw5d768ss3sxg211-devenv-profile .devenv/profile
|
|
|
|
'
|
|
export shellHook
|
|
stdenv='/nix/store/fi1k3vh3a70g8cpwmrnc553vvccrny54-naked-stdenv'
|
|
export stdenv
|
|
system='x86_64-linux'
|
|
export system
|
|
runHook ()
|
|
{
|
|
|
|
eval "$shellHook";
|
|
unset runHook
|
|
}
|
|
PATH="$PATH:$nix_saved_PATH"
|
|
XDG_DATA_DIRS="$XDG_DATA_DIRS:$nix_saved_XDG_DATA_DIRS"
|
|
export NIX_BUILD_TOP="$(mktemp -d -t nix-shell.XXXXXX)"
|
|
export TMP="$NIX_BUILD_TOP"
|
|
export TMPDIR="$NIX_BUILD_TOP"
|
|
export TEMP="$NIX_BUILD_TOP"
|
|
export TEMPDIR="$NIX_BUILD_TOP"
|
|
eval "$shellHook"
|