Fix sccache coflict

This commit is contained in:
Hans Mündelein 2026-07-25 13:29:26 +02:00
parent d630c9e550
commit e2c1b44cdb
Signed by untrusted user who does not match committer: hans
GPG Key ID: BA7B55E984CE74F4
1 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,14 @@
vulkan-tools vulkan-tools
]; ];
env.RUSTC_WRAPPER = "sccache"; env.RUSTC_WRAPPER = "sccache";
# Per-user sccache server socket. On the default shared TCP port (4226)
# the first user's server performs every rustc write for every user, so a
# second user's builds die with EACCES in their own target/ dir.
enterShell = ''
sccache_dir="''${XDG_RUNTIME_DIR:-/tmp/sccache-$(id -u)}"
mkdir -p "$sccache_dir"
export SCCACHE_SERVER_UDS="$sccache_dir/sccache.sock"
'';
# https://devenv.sh/languages/ # https://devenv.sh/languages/
languages.rust = { languages.rust = {
enable = true; enable = true;