| 7 Oct 2025 |
alexfmpe | nix-repl> hello.doCheck
true
nix-repl> pkgsCross.gnu64.hello.doCheck
true
nix-repl> pkgsCross.aarch64-multiplatform.hello.doCheck
false
| 01:48:47 |
alexfmpe | I'm on x86_64-linux and I confirmed hello and pkgsCross.gnu64.hello have the same hash so that part's not surprising | 01:49:31 |
alexfmpe | but why does every actual-cross turn off doCheck | 01:49:39 |
Artturin | In reply to @alexfmpe:matrix.org but why does every actual-cross turn off doCheck mkDerivation has a canExecute conditional | 01:50:12 |
Artturin | Check the file | 01:50:17 |
Colin | https://github.com/NixOS/nixpkgs/blob/09c221b2f0726da85b124efb60a1d123971dfa08/pkgs/stdenv/generic/make-derivation.nix#L394 | 01:50:18 |
Colin | still waiting on that TODO on the line above 🤣 | 01:50:40 |
alexfmpe | huuuuh | 01:50:41 |
alexfmpe | ok I'm running into this in the context of running cross tests in haskell | 01:51:28 |
alexfmpe | and I think this canExecute can be generalized to also accept emulatorAvailable | 01:51:58 |
alexfmpe | I'm already using the later to execute screwed up template haskell on the host | 01:52:28 |
alexfmpe | or rather | 01:53:39 |
alexfmpe | something like canExecuteHostOnBuild = buildPlatform.canExecute hostPlatform || hostPlatform.emulatorAvailable buildPlatform; | 01:54:42 |
dramforever | no that would break stuff with doCheck = true; written without regard for cross | 01:57:45 |
dramforever | i'm not sure what it should be like to work around this though | 01:58:19 |
alexfmpe | yeah this looks kinda wrong | 01:58:32 |
alexfmpe | it's saying "there can be no testing without buildPlatform.canExecute" | 01:58:51 |
dramforever | you can make up your own phase | 01:59:12 |
dramforever | preInstallPhases would go next to where checkPhase would be | 02:01:20 |
alexfmpe | feels a bit weird to throw check in a new phase when it's cross | 02:15:33 |
alexfmpe | but I don't see a way around that without adding some sort of doCheckCross to mkDerivation or special-casing haskell in make-derivation | 02:16:17 |
Alyssa Ross | emulators 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 (Ping) left the room. | 15:47:32 |
alexfmpe | I don't disagree with the issues but realistically what's the alternative? | 20:22:23 |
alexfmpe | everyone owning one machine of each? | 20:22:49 |
alexfmpe | IIUC even the linux-builder runs inside qemu | 20:23:03 |
dramforever | you can write integration tests in passthru-tests that call qemu if you want | 20:25:16 |
dramforever | * you can write integration tests in passthru.tests that call qemu if you want | 20:25:21 |
dramforever | that's easier to work with | 20:25:35 |
dramforever | and i don't understand what this is referring to ...? | 20:26:49 |