mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-12-21 00:11:19 +01:00
save XDG_DATA_DIRS in flakes
This commit is contained in:
parent
eb75bbe7f3
commit
b2d35ce3e9
1 changed files with 2 additions and 0 deletions
2
direnvrc
2
direnvrc
|
|
@ -112,6 +112,7 @@ use_flake() {
|
||||||
local old_tmpdir=${TMPDIR:-__UNSET__}
|
local old_tmpdir=${TMPDIR:-__UNSET__}
|
||||||
local old_temp=${TEMP:-__UNSET__}
|
local old_temp=${TEMP:-__UNSET__}
|
||||||
local old_tempdir=${TEMPDIR:-__UNSET__}
|
local old_tempdir=${TEMPDIR:-__UNSET__}
|
||||||
|
local old_xdg_data_dirs=${XDG_DATA_DIRS:-}
|
||||||
eval "$(< "$profile_rc")"
|
eval "$(< "$profile_rc")"
|
||||||
# nix print-env-dev will create a temporary directory and use it a TMPDIR,
|
# nix print-env-dev will create a temporary directory and use it a TMPDIR,
|
||||||
# we cannot rely on this directory beeing not deleted at some point,
|
# we cannot rely on this directory beeing not deleted at some point,
|
||||||
|
|
@ -125,6 +126,7 @@ use_flake() {
|
||||||
_nix_export_or_unset TMPDIR "$old_tmpdir"
|
_nix_export_or_unset TMPDIR "$old_tmpdir"
|
||||||
_nix_export_or_unset TEMP "$old_temp"
|
_nix_export_or_unset TEMP "$old_temp"
|
||||||
_nix_export_or_unset TEMPDIR "$old_tempdir"
|
_nix_export_or_unset TEMPDIR "$old_tempdir"
|
||||||
|
export XDG_DATA_DIRS=$XDG_DATA_DIRS${old_xdg_data_dirs:+":"}$old_xdg_data_dirs
|
||||||
}
|
}
|
||||||
|
|
||||||
_nix_extract_direnv() {
|
_nix_extract_direnv() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue