| 9 Sep 2025 |
| imurx changed their profile picture. | 02:24:59 |
| eliaselias joined the room. | 09:30:02 |
| 10 Sep 2025 |
| @jolman:matrix.org joined the room. | 00:25:44 |
| SomeoneSerge (back on matrix) changed their display name from SomeoneSerge (@nixcon & back on matrix) to SomeoneSerge (back on matrix). | 00:34:27 |
| Jason Awuku joined the room. | 12:03:12 |
frontear | Is it possible to cross-compile mesa? I’ve got school projects that require writing OpenGL applications and they use Windows. I’d like to continue using Nix for the development shell and derivations, but I’d need to be able to cross-compile.
I gave the mesa derivation a cursory look and spotted that platforms.unix is the only one that’s defined. I was wondering if cross-compiling it had ever been attempted and whether it would be feasible to do so.
| 20:27:20 |
Artturin | Cross compile yes
Cross compile for windows, dunno | 20:27:48 |
Artturin | Probably not | 20:28:21 |
Artturin | Python3 is marked as broken for windows so | 20:29:35 |
frontear | Bummer, it’s a good thing I asked early then. Suppose I’ll have to cobble together a windows machine for this. | 20:30:15 |
frontear | At the least for testing if the package compiles and works, I suppose I could continue to program it in a Nix devshell. | 20:30:41 |
frontear | Thanks for the answer! | 20:30:54 |
Alyssa Ross | Mesa depends on host Python 3?? | 20:30:59 |
K900 | It makes no sense to cross Mesa to Windows anyway | 20:31:16 |
K900 | Windows has its own OpenGL implementation | 20:31:26 |
K900 | And its own WSI | 20:31:31 |
K900 | (well, OpenGL doesn't really have WSI, but it has WGL which Mesa does not implement) | 20:31:56 |
Artturin | https://github.com/NixOS/nixpkgs/blob/0e70d509032143c409a48178c717a42d1fb109e3/pkgs/development/libraries/mesa/default.nix#L277 for shebang lol | 20:32:27 |
K900 | Point being, you can't cross compile Mesa and produce an application that will be usable on Windows | 20:32:37 |
K900 | And if you want to make an application that uses OpenGL on Windows, you don't need Mesa | 20:33:10 |
K900 | If you want a platform abstraction, you probably want something like https://gen.glad.sh/ | 20:34:44 |
frontear | Yeah I didn’t expect it to be usable, I mostly just wanted to test if it would compile as a simulation for whether or not lecturers could compile my software on their end, just to be safe. | 20:37:00 |
frontear | I suppose throwing together a VM shouldn’t be too hard for something like this | 20:37:18 |
K900 | You are not going to get an environment that's representative of whatever your lecturers will be using | 20:37:30 |
K900 | Assuming they're on native Windows + MSVC | 20:37:38 |
frontear | Yeah that’s an excellent point, so I should definitely get a proper machine going for this. | 20:38:35 |
K900 | If you're doing MinGW it will definitely break | 20:38:55 |
K900 | If you're doing LLVM with MSVC ABI and Windows SDK headers, nixpkgs will explode and it will still break if you end up using any clang-isms | 20:39:28 |
K900 | But an MSVC/WinSDK shaped target is something that nixpkgs just doesn't have | 20:40:53 |
K900 | And it will take a lot of work to make it happen | 20:41:00 |