Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

best way to get store path for resource #1813

Open
sstarcher opened this issue Feb 14, 2024 · 5 comments
Open

best way to get store path for resource #1813

sstarcher opened this issue Feb 14, 2024 · 5 comments
Labels
feature New feature or request triage Issue needs triage

Comments

@sstarcher
Copy link

What problem are you trying to solve?

Tools like antigen need to be sourced from your shell config.

My current method is the following and wanting to see if a better way exists

What solution would you like?

some built in easy way to access paths

Alternatives you've considered

antigen_path=$(cat .local/share/devbox/global/default/devbox.lock | jq -r '.packages."antigen@latest".systems."x86_64-linux".store_path')
source "${antigen_path}/share/antigen/antigen.zsh"

@sstarcher sstarcher added feature New feature or request triage Issue needs triage labels Feb 14, 2024
@Lagoja
Copy link
Contributor

Lagoja commented Feb 27, 2024

The binaries and contents of the Nix package are also symlinked in a global directory within your Devbox Global directory. You can access that file using:

source $DEVBOX_GLOBAL_PREFIX/share/antigen/antigen.zsh

@sstarcher
Copy link
Author

$DEVBOX_GLOBAL_PREFIX returns nothing while I'm in my global shell.

❯ env | grep DEVBOX | cut -d= -f1
DEVBOX_CONFIG_DIR
DEVBOX_INIT_PATH
DEVBOX_NIX_ENV_PATH_179252a935a77cf6dd326dd0ddb3dbe440ea6b902264dc0468c024c617c76d2c
DEVBOX_PACKAGES_DIR
DEVBOX_PATH_STACK
DEVBOX_PROJECT_ROOT
DEVBOX_SYSTEM_BASH
DEVBOX_SYSTEM_SED
__DEVBOX_SHELLENV_HASH_179252a935a77cf6dd326dd0ddb3dbe440ea6b902264dc0468c024c617c76d2c
DEVBOX_REFRESH_ALIAS_179252a935a77cf6dd326dd0ddb3dbe440ea6b902264dc0468c024c617c76d2c

@Lagoja
Copy link
Contributor

Lagoja commented Feb 27, 2024

returns nothing while I'm in my global shell.

How are you activating your global shell? Are you running eval "$(devbox global shellenv --init-hook)" in your zshrc?

Another option you could try is:

$(devbox global path)/.devbox/nix/profile/default/share/antigen/antigen.zsh

@sstarcher
Copy link
Author

I was using eval "$(devbox global shellenv)"

This looks to work $(devbox global path)/.devbox/nix/profile/default/share/antigen/antigen.zsh

@sstarcher
Copy link
Author

I'm using
eval "$(devbox global shellenv)"

This does work
$(devbox global path)/.devbox/nix/profile/default/share/antigen/antigen.zsh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request triage Issue needs triage
Development

No branches or pull requests

2 participants