1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 13:21:47 +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

@ -9,7 +9,9 @@
#include <fstream>
#include <string>
#include <regex>
#include <glob.h>
#ifndef _WIN32
# include <glob.h>
#endif
namespace nix {
@ -547,6 +549,7 @@ nlohmann::json Args::toJSON()
static void _completePath(AddCompletions & completions, std::string_view prefix, bool onlyDirs)
{
completions.setType(Completions::Type::Filenames);
#ifndef _WIN32 // TODO implement globbing completions on Windows
glob_t globbuf;
int flags = GLOB_NOESCAPE;
#ifdef GLOB_ONLYDIR
@ -564,6 +567,7 @@ static void _completePath(AddCompletions & completions, std::string_view prefix,
}
}
globfree(&globbuf);
#endif
}
void Args::completePath(AddCompletions & completions, size_t, std::string_view prefix)