!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

353 Members
111 Servers

Load older messages


SenderMessageTime
23 Apr 2026
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howEven better if you can execute something from within Linux to boot into the IOS like kexec13:46:02
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howThen you have turned the Linux side into a glorified bootloader for the IOS13:46:13
@marie:marie.cologneMarie yes 15:52:24
@marie:marie.cologneMarieyou just chainload the whole thing from aroma15:52:33
@marie:marie.cologneMarie good luck, but probably not 15:53:16
@marie:marie.cologneMariealso, activation scripts 👎️15:53:28
26 Apr 2026
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&i somehow managed to build ghc for riscv with multithreading disabled and with both the ngc and llvm disabled ???12:45:15
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&* i somehow managed to build ghc for riscv with multithreading disabled and with both the ncg and llvm disabled ???12:45:45
@alexfmpe:matrix.orgalexfmpeghc that compiles for riscv or actually compiled for running on riscv?16:45:36
@alexfmpe:matrix.orgalexfmpeIIRC I've done the former for recent versions, but the later I'm told doesn't work after 9.416:46:20
@alexfmpe:matrix.orgalexfmpe Lotte (it/its)/Cinny (she/her) θΔ&: https://github.com/NixOS/nixpkgs/blob/03de9fe87cb2dcec8da9dbaa3ad1c71ea7fef223/pkgs/top-level/release-haskell.nix#L478 16:46:53
@alex:tunstall.xyzAlex

Registerised GHC 9.4.8 doesn't work properly in Nixpkgs, so the build is configured to be unregisterised by default.
https://github.com/NixOS/nixpkgs/blob/03de9fe87cb2dcec8da9dbaa3ad1c71ea7fef223/pkgs/development/compilers/ghc/common-make-native-bignum.nix#L99

Use 9.4.8 to boot a later version and you can have a full-featured GHC.

[nixos@nixos:~/system]$ result-ghc/bin/ghc --info | grep -ie platform -e version -e backend -e thr
 ,("RTS ways","v thr thr_debug thr_debug_dyn thr_dyn debug debug_dyn dyn")
 ,("target platform string","riscv64-unknown-linux")
 ,("Project version","9.10.3")
 ,("Project Version Int","910")
 ,("Booter version","9.8.4")
 ,("Build platform","riscv64-unknown-linux")
 ,("Host platform","riscv64-unknown-linux")
 ,("Target platform","riscv64-unknown-linux")
 ,("Target default backend","LLVM")

You can find a working example of how to do this in https://github.com/alexandretunstall/nixos-riscv. In particular, see modules/compilers/ghc.nix.

20:31:29
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&yeah i am currently building 9.6.7 now20:34:50
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&cross compiled for running on riscv20:35:14
@alexfmpe:matrix.orgalexfmpethe correct Alex will now take over20:35:44
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&i think i just recreated the hadrian patch in a worse way20:35:55
@alex:tunstall.xyzAlexPlease do share how if you manage to get that to work. I couldn't convince Hadrian to produce the correct output.20:35:58
@alex:tunstall.xyzAlexAlso, you may want to double check that the binary is actually for running on riscv64. Hadrian has a tendency to build a stage 2 cross-compiler instead of a stage 1 cross-compiler.20:37:04
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&i also got a bootstrap from a debian 9.6.6 package20:37:41
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&it's still in stage 020:37:52
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&lemme look at the object files though20:38:19
@alex:tunstall.xyzAlexAh, if you're booting a fully native build from Debian's GHC it might be fine. I haven't touched Debian's packages.20:38:42
@alex:tunstall.xyzAlex* Ah, if you're booting a fully native build from Debian's GHC it might be fine. I haven't tried Debian's packages.20:38:51
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&i was doing it before but i replaced it with a bootstrap from cross compiled ghc9.4.820:39:32
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&which is what i originally wanted to do but was foiled by stdenv shenanigans20:40:04
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&asm file in build dir is riscv so it's probably fine
Download asm file in build dir is riscv so it's probably fine
20:41:07
@alex:tunstall.xyzAlexNice. Looks promising. Since you mentioned 9.4.8 cross as a boot, is it a native build?20:42:24
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&the 967 build is native20:42:58
@lotte:chir.rsLotte (it/its)/Cinny (she/her) θΔ&(running in qemu because my vf2 ain't got the cpu power for that)20:43:36
@alex:tunstall.xyzAlexYeah, that should work without trouble. If it doesn't, I'd be curious to reproduce the issue and investigate why.20:43:46

Show newer messages


Back to Room ListRoom Version: 6