1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 17:31:47 +02:00

Factor out lookupExecutable and other PATH improvments

This ended up motivating a good deal of other infra improvements in
order to get Windows right:

- `OsString` to complement `std::filesystem::path`

- env var code for working with the underlying `OsString`s

- Rename `PATHNG_LITERAL` to `OS_STR`

- `NativePathTrait` renamed to `OsPathTrait`, given a character template
  parameter until #9205 is complete.

Split `tests.cc` matching split of `util.{cc,hh}` last year.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
John Ericson 2024-08-05 12:05:29 -04:00
parent 0836888002
commit 6c861b9c51
32 changed files with 616 additions and 97 deletions

View file

@ -129,6 +129,7 @@ sources = files(
'english.cc',
'environment-variables.cc',
'error.cc',
'executable-path.cc',
'exit.cc',
'experimental-features.cc',
'file-content-address.cc',
@ -183,6 +184,7 @@ headers = [config_h] + files(
'english.hh',
'environment-variables.hh',
'error.hh',
'executable-path.hh',
'exit.hh',
'experimental-features.hh',
'file-content-address.hh',
@ -202,6 +204,7 @@ headers = [config_h] + files(
'lru-cache.hh',
'memory-source-accessor.hh',
'muxable-pipe.hh',
'os-string.hh',
'pool.hh',
'position.hh',
'posix-source-accessor.hh',