if type -P lorri &>/dev/null; then
    eval "$(lorri direnv --flake ${DIRENV_USE_FLAKE_ARGS:-.})"
    test ! -f "$DEVSHELL_DIR/env.bash" || source "$DEVSHELL_DIR/env.bash"
else
    echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]'
    use flake ${DIRENV_USE_FLAKE_ARGS:-.} --impure --accept-flake-config
fi
