lix/src/libutil
Robert Hensing d86009bd76 Add build-dir setting, clean up default TMPDIR handling
This is a squash of upstream PRs #10303, #10312 and #10883.

fix: Treat empty TMPDIR as unset

Fixes an instance of

    nix: src/libutil/util.cc:139: nix::Path nix::canonPath(PathView, bool): Assertion `path != ""' failed.

... which I've been getting in one of my shells for some reason.
I have yet to find out why TMPDIR was empty, but it's no reason for
Nix to break.

(cherry picked from commit c3fb2aa1f9d1fa756dac38d3588c836c5a5395dc)

fix: Treat empty XDG_RUNTIME_DIR as unset

See preceding commit. Not observed in the wild, but is sensible
and consistent with TMPDIR behavior.

(cherry picked from commit b9e7f5aa2df3f0e223f5c44b8089cbf9b81be691)

local-derivation-goal.cc: Reuse defaultTempDir()

(cherry picked from commit fd31945742710984de22805ee8d97fbd83c3f8eb)

fix: remove usage of XDG_RUNTIME_DIR for TMP

(cherry picked from commit 1363f51bcb24ab9948b7b5093490a009947f7453)

tests/functional: Add count()

(cherry picked from commit 6221770c9de4d28137206bdcd1a67eea12e1e499)

Remove uncalled for message

(cherry picked from commit b1fe388d33530f0157dcf9f461348b61eda13228)

Add build-dir setting

(cherry picked from commit 8b16cced18925aa612049d08d5e78eccbf0530e4)
Change-Id: Ic7b75ff0b6a3b19e50a4ac8ff2d70f15c683c16a
2024-06-24 11:30:32 +03:00
..
args libutil: fix args assert being thrown on Darwin in nix-eval-jobs 2024-05-31 12:17:06 +00:00
abstract-setting-to-json.hh
ansicolor.hh
archive.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
archive.hh util.{hh,cc}: Split out file-system.{hh,cc} 2024-05-29 09:54:47 +02:00
args.cc libutil: fix args assert being thrown on Darwin in nix-eval-jobs 2024-05-31 12:17:06 +00:00
args.hh libutil: fix args assert being thrown on Darwin in nix-eval-jobs 2024-05-31 12:17:06 +00:00
box_ptr.hh
canon-path.cc util.{hh,cc}: Split out file-system.{hh,cc} 2024-05-29 09:54:47 +02:00
canon-path.hh
cgroup.cc util.{hh,cc}: Split out strings.{hh,cc} 2024-05-29 11:01:34 +02:00
cgroup.hh
chunked-vector.hh
closure.hh
comparator.hh util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
compression.cc BrotliDecompressionSource: don't bail out too early 2024-06-20 09:21:13 +03:00
compression.hh libutil: add makeDecompressionSource 2024-06-19 10:50:12 +00:00
compute-levels.cc
compute-levels.hh
config-impl.hh util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
config.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
config.hh chore: rebrand Nix to Lix when it makes sense 2024-06-01 20:31:24 +02:00
current-process.cc Remove 100s of CPU time (10%) from build times (1465s -> 1302s) 2024-05-29 22:16:15 -07:00
current-process.hh util.{hh,cc}: Split out current-process.{hh,cc} 2024-05-29 11:01:34 +02:00
english.cc
english.hh
environment-variables.cc util.{hh,cc}: Split out environment-variables.{hh,cc} 2024-05-28 11:29:29 +02:00
environment-variables.hh util.{hh,cc}: Split out environment-variables.{hh,cc} 2024-05-28 11:29:29 +02:00
error.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
error.hh libmain: fix UB in verbosity assignment 2024-06-18 19:26:54 -07:00
escape-char.cc
escape-char.hh
escape-string.cc
escape-string.hh
exit.cc
exit.hh
experimental-features-json.hh
experimental-features.cc chore: rebrand Nix to Lix when it makes sense 2024-06-01 20:31:24 +02:00
experimental-features.hh
file-descriptor.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
file-descriptor.hh util.{hh,cc}: Split out unix-domain-socket.{hh,cc} 2024-05-29 11:01:34 +02:00
file-system.cc Add build-dir setting, clean up default TMPDIR handling 2024-06-24 11:30:32 +03:00
file-system.hh Add build-dir setting, clean up default TMPDIR handling 2024-06-24 11:30:32 +03:00
finally.hh
fmt.hh libutil: Set boost defines for FreeBSD 2024-06-16 03:41:15 +00:00
git.cc
git.hh
hash.cc libutil: return a source from readFile 2024-06-19 10:50:12 +00:00
hash.hh util.{hh,cc}: Split out file-system.{hh,cc} 2024-05-29 09:54:47 +02:00
hilite.cc
hilite.hh
input-accessor.hh util.{hh,cc}: Split out file-system.{hh,cc} 2024-05-29 09:54:47 +02:00
json-impls.hh
json-utils.cc
json-utils.hh
lix-util.pc.in packaging: rename nixexpr -> lixexpr and so on 2024-05-23 16:45:23 -06:00
logging-json.hh
logging.cc libmain: fix UB in verbosity assignment 2024-06-18 19:26:54 -07:00
logging.hh doc-comment Fields for Activity and Result types 2024-06-23 16:30:48 +00:00
lru-cache.hh
meson.build build: expose option to enable or disable precompiled std headers 2024-06-06 12:46:26 -06:00
monitor-fd.hh
namespaces.cc libutil: return Pid from startProcess, not pid_t 2024-06-23 11:52:49 +00:00
namespaces.hh util.{hh,cc}: Split out namespaces.{hh,cc} 2024-05-29 11:41:16 +02:00
pool.hh
position.cc
position.hh
print-elided.cc
print-elided.hh
processes.cc libutil: remove runProgram2 stdin functionality 2024-06-23 17:29:40 +00:00
processes.hh libutil: remove runProgram2 stdin functionality 2024-06-23 17:29:40 +00:00
ref.hh add and fix -Wdeprecated-copy 2024-05-09 13:02:45 +00:00
references.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
references.hh
regex-combinators.hh util.{hh,cc}: Split out strings.{hh,cc} 2024-05-29 11:01:34 +02:00
regex.cc
regex.hh
repair-flag.hh
serialise.cc libutil: remove sinkToSource eof callback 2024-06-23 11:52:49 +00:00
serialise.hh libutil: remove sinkToSource eof callback 2024-06-23 11:52:49 +00:00
shlex.cc util.{hh,cc}: Split out strings.{hh,cc} 2024-05-29 11:01:34 +02:00
shlex.hh
signals.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
signals.hh util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
source-path.cc
source-path.hh util.{hh,cc}: Split out file-system.{hh,cc} 2024-05-29 09:54:47 +02:00
split.hh util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
strings.cc Remove 100s of CPU time (10%) from build times (1465s -> 1302s) 2024-05-29 22:16:15 -07:00
strings.hh Remove 100s of CPU time (10%) from build times (1465s -> 1302s) 2024-05-29 22:16:15 -07:00
suggestions.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
suggestions.hh util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
sync.hh libutil: tidy Sync and fix its move constructor 2024-06-18 15:11:31 -07:00
tarfile.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
tarfile.hh
terminal.cc util.{hh,cc}: Split out terminal.{hh,cc} 2024-05-29 09:54:47 +02:00
terminal.hh util.{hh,cc}: Split out terminal.{hh,cc} 2024-05-29 09:54:47 +02:00
thread-pool.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
thread-pool.hh util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
topo-sort.hh
types.hh util.hh: Move stuff to types.hh 2024-05-29 11:42:42 +02:00
unix-domain-socket.cc libutil: give Pid proper resource semantics 2024-06-23 11:52:49 +00:00
unix-domain-socket.hh util.{hh,cc}: Split out unix-domain-socket.{hh,cc} 2024-05-29 11:01:34 +02:00
url-name.cc util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
url-name.hh util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
url-parts.hh
url.cc util.{hh,cc}: Split out strings.{hh,cc} 2024-05-29 11:01:34 +02:00
url.hh
users.cc util.{hh,cc}: Split out users.{hh,cc} 2024-05-29 11:01:34 +02:00
users.hh util.{hh,cc}: Split out users.{hh,cc} 2024-05-29 11:01:34 +02:00
variant-wrapper.hh
xml-writer.cc
xml-writer.hh