-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows MinGW support #1320
Comments
It's probably not what you want, but I used to use nix for cross-compilation Linux->MinGW – to do CI on Windows SW without actually needing any Windows. Some packages needed fixing, but most problems could be resolved by finding patches on the internet (pushed those to the official nixpkgs repo). I heard of standard nix used on i686-cygwin, not too long ago, but it's certainly not among the "top-tier" platforms. |
Great! I mean in general to be officially supported. |
IMHO "official support" is mainly about getting enough people interested so they manage to keep it working well. Some basic cross-compiled binaries are produced by the build farm already: http://hydra.nixos.org/jobset/nixpkgs/cross-trunk#tabs-jobs |
So it is possible (theoretically) Stack to run under Windows (with MinGW) and do use Nix package system for building dependencies under Windows for Windows? |
@varosi with WSL, I think it should be possible. This is something I'm interested in as well. |
@midipix may be another option. |
@domenkozar I do not think that using WSL is "under Windows". |
Has anyone ever been able to build Nix itself through MinGW? I would be interested in seeing if anything works. Multi-user stuff is pretty reliant on POSIX things but the basic Nix commands are pretty straightforward C++. I'm sure the filesystem would struggle though. |
I think MinGW/MSYS2 bash per se can be considered native. |
I marked this as stale due to inactivity. → More info |
There is this repository called Nix-windows. Not sure in what state it is. I have also been interested in using Nix for some open-source projects. However, because Nix doesn't support Windows, I am not sure if this is an inclusive decision, as this would ignore a huge portion of the developers. |
Nix works on WSL and Cygwin just out of the box. |
Thanks. That's better than nothing, but I wish there was native Windows support. |
The main discussion/changelog on native seems to be at https://discourse.nixos.org/t/nix-on-windows/1113 |
I really wonder why nixpkgs did not appear first for native Windows. The idea of "portable apps" ("portable" here means the ability to copy app into any directory or cdrom - the read only media! - and run from there) was very popular in Windows. It is familiar to millions of people who grew up with Windows. Even considering that most applications did not need to be compiled, just because they were closed source, from the routine task of downloading_torrent -> patching -> putting_into_apps_own_directory it was natural to develop something similar to nixpkgs |
@kvtb Do you have any recent info on getting nix working on cygwin? I had issues with boost coroutines, and I had to modify the cygwin runtime to get it to work: https://cygwin.com/pipermail/cygwin-developers/2020-September/011970.html I've got to the point where I can bootstrap nix on cygwin, but it involved changes to cygwin, nix, and nixpkgs. |
I marked this as stale due to inactivity. → More info |
Unmarking stale, still relevant. |
@be5invis commented on Apr 15, 2017:
Well, by native do you mean linking to MSVC runtime (CRT) lib or calling WinAPI? In any case, the calls go through at least one or two API layers to reach NTAPI (Native API, the syscalls wrapper). Both these cases also require having a bunch of additional header files to be present. So it (technically) would still be a framework. And NTAPI is exactly what @midipix uses too to implement *nix style libc functions (the alternative layer). Only that it follows the MUSL semantics instead of the GLIBC ones. But nix already supports MUSL, I guess: Lines 152 to 158 in 5985b8b
With regard to having no dependency, every Midipix-based app (and I believe everty lib) can be linked statically.
So, no binary dependency here either. I think Midipix is a very cool way to go. Only that it's still pre-alpha. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
I mean wsl support is easier than making support for NATIVE windows support. As the nix store would have to be declared under But general support for nix store would possibly adding components to nix which would be complex. |
At the end of the day, If you want support for it, I would suggest making a fork of nix and work on it. |
Maybe it could be done by mapping a directory to a drive letter e.g. do what This way the user can have flexibility about the physical storage location of the Nix store, while still providing the fixed absolute paths that Nix requires. |
I am on the Nix team and I am doing this. :) |
Welp it's been at least 8 years since this issue has been created just don't see it coming anytime soon. |
Progress only actually started upstream earlier this year! :) |
Really? Link me to it I am just curious. |
Also is there a roadmap? |
Also I would help but I would need to know cp and have a windows vm to help. |
I mean I could run qemu but it won't be a good test. |
@Eveeifyeve for details please go to the channel. We don't have a written-up roadmap yet. Much work is based test-failure-driven. |
Tracking issue
This is happening! Join
#windows:nixos.org
on matrix if you want to help out!Original description
Currently Stack is using MinGW32/MinGW64 under Windows to cope with C/C++/Fortran dependencies. Stack + Nix is a great tandem that could be turned into very easy to deploy system on most major operating systems. That way Haskell will become even more popular language. Currently Nix support Linux and Mac OS only.
What you think over the idea to use MinGW tooling in combination with Nix for building C/C++ dependencies under Windows?
The text was updated successfully, but these errors were encountered: