lib.systems, windows: Add MinGW tuple #430184
lib.systems, windows: Add MinGW tuple #430184RossSmyth wants to merge 2 commits intoNixOS:masterfrom
Conversation
|
There seems to be something funky going on with expecting some sort of array of tuples, and that array has now changed. Should exclusively be more platforms now |
|
@RossSmyth I think we did this before, but there was some problems with autoconf stuff barging on |
|
https://lists.gnu.org/archive/html/config-patches/2023-06/threads.html see this, and messages over the following two months. (wish there was way to succinctly view multi-month threads.) |
| "i686-windows" | ||
| "x86_64-mingw" | ||
| "i686-mingw" | ||
| "aarch64-mingw" |
There was a problem hiding this comment.
These are supposed to match the doubles Nix would use for builtins.currentSystem when built for that platform, so this is only correct if that would report mingw on mingw.
But that raises another problem I hadn't noticed before: @Ericson2314, it doesn't look like any attempt to preserve compatibility was made when the double generation logic was ported to Meson. For example, power64-linux will now be detected as ppc64-linux, and then not recognised by Nixpkgs. That seems not good! Now a Nix built on that platform won't be able to do anything useful with Nixpkgs, so I think that probably needs to be addressed in Nix to restore the old behaviour, which shouldn't have been changed and shouldn't change again in future…
There was a problem hiding this comment.
Since we don't support MinGW, or windows at all yet, that seems fine.
There was a problem hiding this comment.
@alyssais See NixOS/nix#13520, we noticed more recently, fixed it (in two PRs), and did a bunch of backports.
There was a problem hiding this comment.
Since we don't support MinGW, or windows at all yet, that seems fine.
Note that the main, core use of the doubles is "what derivations are allowed to run there". I don't think there are MSVC-only or MinGW-only builders, so xxx-windows is probably fine?
|
Hmmm We need some way to express "this is only compatible with the MinGW ABI" because right now every package that uses |
|
Which we can encode fine with our existing "patterns" system for platforms, without needing separate glibc and musl doubles. |
|
For example, bash is already marked incompatible specifically with mingw |
|
The biggest difference is that musl and glibc are generally API-compatible. While MinGW and MSVC generally are not. |
|
I don't think the forth component needs to distinguish between ABI-compatible options. For example (sort of), back int he day there was Debian GNU/kfreebsd, using glibc. (Not our like our BSD support using matching BSD kernels and libcs.) The config they used is |
Yep, that's why we don't need to use the platform patterns much so far. But this is the problem they solve, and we can use them more as required. That's what they're for. |
|
I see. I guess the main brother I have is that if you do |
|
Yep, just like none of them are musl. In practice this matters extremely little. We have to have a default for a platform, but it's not difficult at all to use a different one. |
|
Okie dokie |
Things done
MinGW and MSVCs' ABIs are not compatible. Generally a project only supports one or the other.
CPU-mingwtuples to be parsedCPU-mingwtuples to be outputlib.platforms.mingwlib.platforms.msvcwindowspassthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.