cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
3.56k stars 259 forks source link

XDG_RUNTIME_DIR is not used #1116

Closed bobvanderlinden closed 1 month ago

bobvanderlinden commented 1 month ago

Describe the bug

Currently XDG_RUNTIME_DIR and TMPDIR environment variables are not used when creating DEVENV_RUNTIME, which means devenv will always fallback to using /tmp/devenv-*.

I guess this is because builtins.getEnv will not work due to purity?

I ran into this while investigating #1115

To reproduce

$ echo $XDG_RUNTIME_DIR
/run/user/1000
$ devenv init hello
$ cd hello
$ devenv shell
$ echo $DEVENV_RUTNIME
/tmp/devenv-f57424b

Version

devenv 1.0.2 (x86_64-linux)

domenkozar commented 1 month ago

This is addressed in https://github.com/cachix/devenv/pull/1110/files, maybe I should extract it out and land it to main.