1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-01 20:51:48 +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

@ -2,7 +2,12 @@
#include "environment-variables.hh"
#include "sync.hh"
#include <sys/ioctl.h>
#if _WIN32
# include <io.h>
# define isatty _isatty
#else
# include <sys/ioctl.h>
#endif
#include <unistd.h>
namespace nix {
@ -92,6 +97,7 @@ std::string filterANSIEscapes(std::string_view s, bool filterAll, unsigned int w
static Sync<std::pair<unsigned short, unsigned short>> windowSize{{0, 0}};
#ifndef _WIN32
void updateWindowSize()
{
struct winsize ws;
@ -101,6 +107,7 @@ void updateWindowSize()
windowSize_->second = ws.ws_col;
}
}
#endif
std::pair<unsigned short, unsigned short> getWindowSize()