| 4 Feb 2025 |
| Axman6 joined the room. | 07:56:52 |
| unebnf joined the room. | 07:58:14 |
magic_rb | @axman6:matrix.org youll have to go through pkgsCross.something-something.hostPackages.ghc | 08:06:36 |
magic_rb | Thats the general way to get a cross compiler with nixpkgs. The javascript one works, havent tested the wasm one | 08:07:06 |
Axman6 | so pkgsCross.wasi32.hostPackages.ghc121 or something? | 08:07:59 |
magic_rb | Something along those lines, open up a nix repl and see whats available | 08:08:20 |
Axman6 | s/Packages/Platform | 08:08:57 |
Axman6 | yeah doing that now | 08:09:02 |
magic_rb | In reply to @axman6:matrix.org s/Packages/Platform Good catch | 08:09:12 |
magic_rb | You might end up compiling a lot from source, so get a coffee or smth | 08:09:31 |
Axman6 | hmm, no ghc in there, nor haskell | 08:09:48 |
magic_rb | Check the JS one, im sure i got that working in the past. So that we confirm were looking in the right place | 08:10:21 |
Axman6 | .hostPlatform is mostly just info about the host platform, I can't see packages in there (not that I've looked hard) | 08:11:32 |
magic_rb | Ah then hostPackages? | 08:11:43 |
magic_rb | Dunno | 08:11:46 |
Axman6 | there's .gcc but I'd expect that | 08:11:48 |
Axman6 | doesn't exist | 08:11:52 |
magic_rb | Ah | 08:11:55 |
magic_rb | https://codeberg.org/magic_rb/percept-web/src/branch/master/flake.nix#L23 | 08:12:39 |
magic_rb | Ah sorry this id where i found it | 08:12:47 |
Axman6 | I did also come across: https://gitlab.haskell.org/haskell-wasm/ghc-wasm-meta | 08:13:04 |
magic_rb | Ah it downloads binary releases and them nixifies them | 08:14:37 |
magic_rb | https://gitlab.haskell.org/haskell-wasm/ghc-wasm-meta/-/blob/master/autogen.json?ref_type=heads | 08:14:42 |
Alex | In reply to @axman6:matrix.org so pkgsCross.wasi32.hostPackages.ghc121 or something? For compilers, you probably want buildPackages, not hostPackages. | 08:47:48 |
Alex | Summary:
pkgsCross.aarch64-multiplatform.ghc - GHC built on current platform, runs on aarch64, targets aarch64
pkgsCross.aarch64-multiplatform.buildPackages.ghc - GHC built on current platform, runs on current platform, targets aarch64
| 08:54:18 |
alexfmpe | don't think there's much in the way of ghc wasi support though? https://github.com/NixOS/nixpkgs/pull/225000#issuecomment-1622683134 | 08:59:24 |
alexfmpe | pkgsCross.ghcjs.haskell.packages.ghc912.hello is in good shape though | 09:00:22 |
sterni (he/him) | Yes, we don't support the GHC wasm backend since it is basically a parallel world, requiring its own forks of LLVM and wasi-sdk which we would like to avoid maintaining | 13:35:19 |
sterni (he/him) | especially LLVM is a problem since we have non trivial patches ourselves and IIRC the wasm ghc ones apply cleanly on top | 13:35:57 |
sterni (he/him) | Eventually, we'll probably have to bite the bullet, though, I did not get the impression that this situation will improve any time soon | 13:36:38 |