[Nix#8995] Nix configuration option for overriding TMPDIR #112
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream-Issue: NixOS/nix#8995
Is your feature request related to a problem? Please describe.
I'm running Nix with a case-sensitive store on macOS, where the root filesystem is case-insensitive. This allows me to store outputs with case-colliding files. However, the temporary directory used to download/unpack archives and to build derivations is located inside of
$TMPDIR
, with a fallback to/tmp
, which means it occurs on my case-insensitive root volume instead of my case-sensitive Nix store.Describe the solution you'd like
Nix should have a configuration option that sets the location for the temporary directory, which if set will override the
TMPDIR
env var. Nix can consult this config option first before looking at theTMPDIR
env var. This way I can set the config value to a path in my Nix store (e.g./nix/tmp
) and not have to worry about theTMPDIR
env var.Describe alternatives you've considered
For the time being I'm using an overlay that replaces the
nix
derivation with a wrapper that setsTMPDIR
, but this causes problems (the most obvious being unnecessary rebuilds of anything that depends on it). I'm considering removing the overlay in favor of customizingnix.package
, but this means any other derivations that usenix
won't get the desired temporary directory. Also anything that uses Nix as a library may use the wrong temporary directory for Nix-related actions.Priorities
Add 👍 to issues you find important.
This issue was mentioned on Gerrit on the following CLs: