[Nix#8995] Nix configuration option for overriding TMPDIR #112
Labels
No labels
Area/build-packaging
Area/evaluator
Area/flakes
Area/profiles
Area/remote-builds
Area/repl
Area/store
bug
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
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…
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.