1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Fix build-remote in nix-static

'build-remote' is now executed via /proc/self/exe so it always works.
This commit is contained in:
Eelco Dolstra 2022-06-22 22:43:53 +02:00
parent 3c48c4b4f7
commit d3176ce076
7 changed files with 47 additions and 12 deletions

View file

@ -633,6 +633,20 @@ Path getDataDir()
}
std::optional<Path> getSelfExe()
{
static std::optional<Path> cached = []()
{
#if __linux__
return readLink("/proc/self/exe");
#else
return std::nullopt;
#endif
}();
return cached;
}
Paths createDirs(const Path & path)
{
Paths created;