lix/src/libcmd
Lily Ballard 3c8096e5cb feat: Add temp-dir setting
This adds a new temp-dir setting for controlling the temporary directory
without having to change the TMPDIR env var. This can be used to e.g.
use a path on a case-sensitive store on macOS for temporary files
without changing the TMPDIR var used by interactive shells or commands
invoked with `nix run`.

This also stops unsetting `TMPDIR` on darwin when the env var value
starts with `/var/folders/`, preferring instead to just do the check
when reading `TMPDIR`. This way the inherited `TMPDIR` env var is
preserved for child processes (such as interactive shells).

As a side effect this changes the behavior of `nix-build -o ''` to act
like `nix-build --no-out-link` instead of failing with an error caused
by trying to create a symlink at the cwd.

Fixes: #253
Fixes: #112
Change-Id: I9ee826323f2deca62854715a77ca7a373a948a29
2024-11-06 18:11:47 -08:00
..
built-path.cc Merge pull request #9582 from pennae/misc-opts 2024-03-04 07:32:31 +01:00
built-path.hh treewide: fix a bunch of lints 2024-08-26 16:13:03 -07:00
cmd-profiles.cc feat: Add temp-dir setting 2024-11-06 18:11:47 -08:00
cmd-profiles.hh language: cleanly ban integer overflows 2024-07-13 00:59:33 +02:00
command.cc Merge pull request #9289 from edolstra/fix-warnings 2024-03-04 05:27:35 +01:00
command.hh refactor some nix-env and profile code to libcmd 2024-04-29 01:19:21 +00:00
common-eval-args.cc treewide: consistently mark overridden settings as such 2024-10-15 19:55:50 +02:00
common-eval-args.hh add docstring to lookupFileArg 2024-05-23 14:11:10 -06:00
editor-for.cc tree-wide: shuffle headers around for about 30s compile time 2024-08-28 09:55:05 -07:00
editor-for.hh Merge pull request #9634 from 9999years/combine-abstract-pos-and-pos 2024-03-05 23:46:18 -07:00
installable-attr-path.cc remove unused headers in installable-attr-path 2024-08-01 00:37:13 +00:00
installable-attr-path.hh remove unused headers in installable-attr-path 2024-08-01 00:37:13 +00:00
installable-derived-path.cc Fixing #7479 2023-08-18 11:44:00 -04:00
installable-derived-path.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
installable-flake.cc language: cleanly ban integer overflows 2024-07-13 00:59:33 +02:00
installable-flake.hh Rename 'resolvedRef' to 'lockedRef' 2023-07-03 12:23:57 +02:00
installable-value.cc Merge pull request #9634 from 9999years/combine-abstract-pos-and-pos 2024-03-05 23:46:18 -07:00
installable-value.hh language: cleanly ban integer overflows 2024-07-13 00:59:33 +02:00
installables.cc treewide: consistently mark overridden settings as such 2024-10-15 19:55:50 +02:00
installables.hh util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
legacy.cc Remove static initializers for RegisterLegacyCommand 2024-10-01 16:08:58 -07:00
legacy.hh Remove static initializers for RegisterLegacyCommand 2024-10-01 16:08:58 -07:00
lix-cmd.pc.in packaging: rename nixexpr -> lixexpr and so on 2024-05-23 16:45:23 -06:00
markdown.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
markdown.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
meson.build fix: make static build work again 2024-11-01 16:55:47 +04:00
repl-interacter.cc Remove readline support 2024-09-16 10:48:20 -07:00
repl-interacter.hh repl: log errors writing to history file 2024-05-23 18:10:23 +00:00
repl-overlays.nix format repl-overlays.nix to fix pre-commit checks 2024-04-09 02:21:26 -06:00
repl.cc treewide: consistently mark overridden settings as such 2024-10-15 19:55:50 +02:00
repl.hh refactor: move readline stuff into its own file 2024-03-11 01:04:52 -07:00