!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

552 Members
117 Servers

Load older messages


SenderMessageTime
10 Sep 2025
@frontear:matrix.orgfrontearBummer, 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:matrix.orgfrontearAt 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:matrix.orgfrontearThanks for the answer!20:30:54
@qyliss:fairydust.spaceAlyssa RossMesa depends on host Python 3??20:30:59
@k900:0upti.meK900 It makes no sense to cross Mesa to Windows anyway 20:31:16
@k900:0upti.meK900 Windows has its own OpenGL implementation 20:31:26
@k900:0upti.meK900And its own WSI20:31:31
@k900:0upti.meK900 (well, OpenGL doesn't really have WSI, but it has WGL which Mesa does not implement) 20:31:56
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/blob/0e70d509032143c409a48178c717a42d1fb109e3/pkgs/development/libraries/mesa/default.nix#L277 for shebang lol20:32:27
@k900:0upti.meK900 Point being, you can't cross compile Mesa and produce an application that will be usable on Windows 20:32:37
@k900:0upti.meK900 And if you want to make an application that uses OpenGL on Windows, you don't need Mesa 20:33:10
@k900:0upti.meK900 If you want a platform abstraction, you probably want something like https://gen.glad.sh/ 20:34:44
@frontear:matrix.orgfrontearYeah 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:matrix.orgfrontearI suppose throwing together a VM shouldn’t be too hard for something like this20:37:18
@k900:0upti.meK900 You are not going to get an environment that's representative of whatever your lecturers will be using 20:37:30
@k900:0upti.meK900Assuming they're on native Windows + MSVC20:37:38
@frontear:matrix.orgfrontearYeah that’s an excellent point, so I should definitely get a proper machine going for this.20:38:35
@k900:0upti.meK900 If you're doing MinGW it will definitely break 20:38:55
@k900:0upti.meK900If 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-isms20:39:28
@k900:0upti.meK900 But an MSVC/WinSDK shaped target is something that nixpkgs just doesn't have 20:40:53
@k900:0upti.meK900And it will take a lot of work to make it happen20:41:00
@frontear:matrix.orgfrontearThat’s insightful thank you. I’ll go get an actual system setup for my sake then20:42:33
@rosssmyth:matrix.orgrosssmyth We are working on it!
#windows:nixos.org
23:49:05
@rosssmyth:matrix.orgrosssmythProgress is being made23:49:24
11 Sep 2025
@ihar.hrachyshka:matrix.orgIhar Hrachyshka joined the room.00:07:24
@winter:catgirl.cloudWinter Can I get an explanation of the propagation mapOffset stuff? I know that e.g. if I want something in nativeBuiildInputs to propagate to buildInputs, depsTargetTargetPropagated is the way, but no mater which way I subtract/add the offsets, nothing is consistent enough that I trust my math is right. 13:24:39
12 Sep 2025
@rosssmyth:matrix.orgrosssmythHow is one supposed to write tests to ensure cross-compilation continues working if you are not supposed to write "pkgsCross" in derivations 01:30:57
@rosssmyth:matrix.orgrosssmythincluding for passthru tests01:31:19
@rosssmyth:matrix.orgrosssmythBased upon: https://github.com/NixOS/nixpkgs/pull/430515#issuecomment-314847776101:33:45
@emilazy:matrix.orgemily I don't see an issue with it for passthru.tests 01:34:57

Show newer messages


Back to Room ListRoom Version: 6