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

Build a minimized Nix with MinGW

At this point many features are stripped out, but this works:

- Can run libnix{util,store,expr} unit tests
- Can run some Nix commands

Co-Authored-By volth <volth@volth.com>
Co-Authored-By Brian McKenna <brian@brianmckenna.org>
This commit is contained in:
John Ericson 2023-09-02 17:35:16 -04:00
parent 2248a3f545
commit 8433027e35
111 changed files with 1162 additions and 140 deletions

View file

@ -3,16 +3,20 @@
#include "types.hh"
#include <sys/types.h>
#ifndef _WIN32
# include <sys/types.h>
#endif
namespace nix {
std::string getUserName();
#ifndef _WIN32
/**
* @return the given user's home directory from /etc/passwd.
*/
Path getHomeOf(uid_t userId);
#endif
/**
* @return $HOME or the user's home directory from /etc/passwd.
@ -58,6 +62,8 @@ std::string expandTilde(std::string_view path);
/**
* Is the current user UID 0 on Unix?
*
* Currently always false on Windows, but that may change.
*/
bool isRootUser();