Nix: Port Nix to Windows, Natively or MinGW+MSYS2

Created on 28 Apr 2017  Â·  7Comments  Â·  Source: NixOS/nix

Possible combinations:

  • Native. No dependency. This may be very hard for *nix developers since they do not have any knowledge about how to do native Win32 development (like: avoid using char*).
  • MinGW/MSYS2. Since nix may depend on many Unix external libraries. However the APIs implemented in MinGW may have artifacts on Windows (i.e. Unicode support).
  • Midipix. It is under early development but its’ library design is better.

Most helpful comment

Part of NPM's success is that it worked in windows, mac, and linux without any special configuration. Yes WSL and Cygwin should be considered special configuration. Food for thought.

All 7 comments

Closing as too vague. This issue asks for a bunch of things, so it's unclear when it could be closed. Also, Nix (AFAIK) already builds on Cygwin.

There already is #1320 for MinGW support.

It also works on the Windows Subsystem for Linux (aka Bash on Ubuntu on Windows)

Part of NPM's success is that it worked in windows, mac, and linux without any special configuration. Yes WSL and Cygwin should be considered special configuration. Food for thought.

If there is funding for this, would there be people willing to take on that job?

Things that I particularly want to get working are:

  • No WSL, Cygwin or anything that the user has to install themselves or is buggy (Cygwin I'm looking at you). Midipix or MSYS may be OK if they are reliable and transparent.
  • Python and some rather usual packages
  • LLVM
  • Qt in native mode - none of this X server stuff that doesn't work - and PyQt/PySide
  • Yosys, Nextpnr, OpenOCD
  • Some GUI installer for newbies that sets up a pre-defined functional environment that more advanced users can tweak later.

Why is MSYS acceptable but not WSL?

AFAIK MSYS applications are simply linked against some special libraries, and then from a user perspective behave as regular Windows applications (but I might be wrong).
WSL requires significant user intervention to set up; also WSL has no GDI access so native Qt isn't going to work. We'd be stuck with a slow, painful to set up, and dysfunctional X server.

Have you tried to compile Nix using MSYS or similar? I'm skeptical Nix won't need a significant rewrite to achieve that but I hope to be wrong.

Was this page helpful?
0 / 5 - 0 ratings