diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 8d9c09561ddb..2a067663f98c 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -313,6 +313,11 @@ rec { libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain }; + ucrt64 = { + config = "x86_64-w64-mingw32"; + libc = "ucrt"; # This distinguishes the mingw (non posix) toolchain + }; + # BSDs x86_64-freebsd = { diff --git a/pkgs/os-specific/windows/mingw-w64/default.nix b/pkgs/os-specific/windows/mingw-w64/default.nix index 221bcd8e89f2..3bfc7a58e727 100644 --- a/pkgs/os-specific/windows/mingw-w64/default.nix +++ b/pkgs/os-specific/windows/mingw-w64/default.nix @@ -36,6 +36,8 @@ in stdenv.mkDerivation { configureFlags = [ "--enable-idl" "--enable-secure-api" + ] ++ lib.optionals (stdenv.targetPlatform.libc == "ucrt") [ + "--with-default-msvcrt=ucrt" ]; enableParallelBuilding = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fb8c59f624a0..deaf1bc990dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21762,6 +21762,7 @@ with pkgs; else if name == "newlib-nano" then targetPackages.newlib-nanoCross or newlib-nanoCross else if name == "musl" then targetPackages.muslCross or muslCross else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64 + else if name == "ucrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64 else if name == "libSystem" then if stdenv.targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries or darwin.iosSdkPkgs.libraries