!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

557 Members
119 Servers

Load older messages


SenderMessageTime
7 Oct 2025
@artturin:matrix.orgArtturin
In reply to @alexfmpe:matrix.org
but why does every actual-cross turn off doCheck
mkDerivation has a canExecute conditional
01:50:12
@artturin:matrix.orgArtturinCheck the file01:50:17
@colin:uninsane.orgColinhttps://github.com/NixOS/nixpkgs/blob/09c221b2f0726da85b124efb60a1d123971dfa08/pkgs/stdenv/generic/make-derivation.nix#L39401:50:18
@colin:uninsane.orgColin still waiting on that TODO on the line above 🤣 01:50:40
@alexfmpe:matrix.orgalexfmpehuuuuh01:50:41
@alexfmpe:matrix.orgalexfmpeok I'm running into this in the context of running cross tests in haskell01:51:28
@alexfmpe:matrix.orgalexfmpeand I think this canExecute can be generalized to also accept emulatorAvailable01:51:58
@alexfmpe:matrix.orgalexfmpeI'm already using the later to execute screwed up template haskell on the host01:52:28
@alexfmpe:matrix.orgalexfmpeor rather01:53:39
@alexfmpe:matrix.orgalexfmpe something like canExecuteHostOnBuild = buildPlatform.canExecute hostPlatform || hostPlatform.emulatorAvailable buildPlatform; 01:54:42
@dramforever:matrix.orgdramforever no that would break stuff with doCheck = true; written without regard for cross 01:57:45
@dramforever:matrix.orgdramforeveri'm not sure what it should be like to work around this though01:58:19
@alexfmpe:matrix.orgalexfmpeyeah this looks kinda wrong01:58:32
@alexfmpe:matrix.orgalexfmpeit's saying "there can be no testing without buildPlatform.canExecute"01:58:51
@dramforever:matrix.orgdramforeveryou can make up your own phase01:59:12
@dramforever:matrix.orgdramforever preInstallPhases would go next to where checkPhase would be 02:01:20
@alexfmpe:matrix.orgalexfmpefeels a bit weird to throw check in a new phase when it's cross02:15:33
@alexfmpe:matrix.orgalexfmpebut I don't see a way around that without adding some sort of doCheckCross to mkDerivation or special-casing haskell in make-derivation02:16:17
@qyliss:fairydust.spaceAlyssa Rossemulators should only be used where they're absolutely necessary, imo. they have large closures and often diverge from actual platform behaviour so provide dubious value.12:53:29
@quadradical:federated.nexusQuadRadical (Ping) left the room.15:47:32
@alexfmpe:matrix.orgalexfmpeI don't disagree with the issues but realistically what's the alternative?20:22:23
@alexfmpe:matrix.orgalexfmpeeveryone owning one machine of each?20:22:49
@alexfmpe:matrix.orgalexfmpeIIUC even the linux-builder runs inside qemu20:23:03
@dramforever:matrix.orgdramforeveryou can write integration tests in passthru-tests that call qemu if you want20:25:16
@dramforever:matrix.orgdramforever* you can write integration tests in passthru.tests that call qemu if you want20:25:21
@dramforever:matrix.orgdramforeverthat's easier to work with20:25:35
@dramforever:matrix.orgdramforeverand i don't understand what this is referring to ...?20:26:49
@dramforever:matrix.orgdramforeverlike, the whole thing is it's not saying that there can be no testing without canExecute, it's saying that there can be no checkPhase without canExecute20:28:10
@dramforever:matrix.orgdramforeverand sadly realistically you can't expect make check to generally work with an emulator20:30:31
@dramforever:matrix.orgdramforever at one point even coreutils couldn't pass tests in qemu user, i went and dig up and fixed it in qemu so that's not a problem now but there's a lot of cursed stuff going on 20:31:57

Show newer messages


Back to Room ListRoom Version: 6