msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.31k stars 1.23k forks source link

nix: init at 2.25.0 #22499

Open puffnfresh opened 2 weeks ago

puffnfresh commented 2 weeks ago

I haven't done a build in a chroot so hopefully I got all the dependencies.

The output executable is not useful at the moment. If you try to run this package, it will crash, because the Nix codebase currently has lots of problems with handling Windows paths. Even after the big task of fixing paths, we'll have to handle process management, making a useful Windows standard environment, adding tests, and lots of other things.

I think it makes sense to not merge this package, until Nix has a minimal working Windows release. What do you think @Ericson2314?

Fixes #22459.

Ericson2314 commented 2 weeks ago

Yeah fine with me just keeping this draft for now.

ognevny commented 2 weeks ago

CLANG64 fails with:

``` FAILED: src/libutil/libnixutil.dll.p/windows_environment-variables.cc.obj "clang++" "-Isrc/libutil/libnixutil.dll.p" "-Isrc/libutil" "-I../nix-2.25.0/src/libutil" "-Isrc/libutil/windows" "-I../nix-2.25.0/src/libutil/windows" "-fdiagnostics-color=always" "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-std=c++2a" "-include" "config-util.hh" "-Wdeprecated-copy" "-Werror=suggest-override" "-Werror=switch" "-Werror=switch-enum" "-Werror=unused-result" "-Wignored-qualifiers" "-Wimplicit-fallthrough" "-Wno-deprecated-declarations" "-D_WIN32_WINNT=0x0602" "-march=nocona" "-msahf" "-mtune=generic" "-O2" "-pipe" "-Wp,-D_FORTIFY_SOURCE=2" "-fstack-protector-strong" "-Wp,-D__USE_MINGW_ANSI_STDIO=1" "-DBOOST_CONTEXT_DYN_LINK=1" "-DBOOST_COROUTINES_DYN_LINK=1" "-DBOOST_ALL_NO_LIB" "-pthread" -MD -MQ src/libutil/libnixutil.dll.p/windows_environment-variables.cc.obj -MF "src/libutil/libnixutil.dll.p/windows_environment-variables.cc.obj.d" -o src/libutil/libnixutil.dll.p/windows_environment-variables.cc.obj "-c" ../nix-2.25.0/src/libutil/windows/environment-variables.cc ../nix-2.25.0/src/libutil/windows/environment-variables.cc:16:31: error: non-constant-expression cannot be narrowed from type 'DWORD' (aka 'unsigned long') to 'wchar_t' in initializer list [-Wc++11-narrowing] 16 | std::wstring value{L'\0', bufferSize}; | ^~~~~~~~~~ ../nix-2.25.0/src/libutil/windows/environment-variables.cc:16:31: note: insert an explicit cast to silence this issue 16 | std::wstring value{L'\0', bufferSize}; | ^~~~~~~~~~ | static_cast( ) 1 error generated. ```
Ericson2314 commented 2 weeks ago

https://github.com/NixOS/nix/pull/11856 OK this would fix the one build failure.

Freed-Wu commented 2 days ago

Related: