Sender | Message | Time |
---|---|---|
25 May 2025 | ||
Yeah, ideally no cross when possible. | 02:33:26 | |
From what I was able to gleam when trying to test the wasm cross stdenv, it looks like it's only necessary for sandboxing things in a way? We could provide an option but idk if it's worth it. | 02:34:48 | |
| 02:36:27 | |
RLBox is important, I mean what's the reason it can't use an unwrappd multi-target Clang? | 02:50:40 | |
it uses libcxx for WASM, I guess? but does it use anything else from pkgsCross ? | 02:50:52 | |
Yeah, idk | 02:51:04 | |
I think it needs wasilibc | 02:52:01 | |
Ok yeah, it needs a wasm toolchain. It looks like upstream uses the wasi-sdk. | 02:54:37 | |
How does crossStdenv handle cross-compiled dependencies? DXVK needs SPIRV and Vulkan headers and windows.pthreads . | 13:39:07 | |
Also, how does it handle NIX_ vars? Does this even work with Darwin since Darwin needs an SDK? | 13:44:42 | |
In reply to @reckenrode:matrix.orgSuffix salt should work with the env vars. Idk about Darwin but it could be made to work. | 14:28:05 | |
In reply to @reckenrode:matrix.orgYou'll have to override the stdenv for the dependencies. | 14:28:23 | |
In reply to @rosscomputerguy:matrix.orgThat doesn’t seem like an improvement. | 14:29:31 | |
In reply to @reckenrode:matrix.orgI don't see really any other way of doing cross without either creating a new nixpkgs instance (what we already have) or only provide cross compilation stdenv's | 14:30:30 | |
DXVK uses a custom MinGW (with the Win32 thread model instead of the POSIX one). When you build https://github.com/NixOS/nixpkgs/blob/6fb6fd3ceff99de72d881f1a97773647c94e5a82/pkgs/by-name/dx/dxvk/package.nix#L28-L44 DXVK itself has dependencies: https://github.com/NixOS/nixpkgs/blob/6fb6fd3ceff99de72d881f1a97773647c94e5a82/pkgs/by-name/dx/dxvk_2/package.nix#L74-L81 The replacement sounds like I need to manually enumerate the transitive dependencies of DXVK, replace all of their | 15:08:53 | |
crossStdenv is still expensive, but now the maintainability of my package has gone down because I have more work to do to build my package instead of just referencing pkgsCross.mingw32.dxvk_2 and pkgsCross.mingwW64.dxvk_2 . | 15:09:59 | |
Note that it’s not possible to write a function to replace inputs that works in all cases because not all dependencies are in buildInputs (or propagatedBuildInputs ). It’s the same problem that overrideSDK had. | 15:15:22 |