nixfmt
nixfmt copied to clipboard
Riscv64 support?
I have a number of low-level nix projects that I also want to start testing on riscv64 support. However not being evaluate haskell on riscv64, stops me from adding this to my devshell/formatter checks.
I saw that ghc in theory has riscv64 support, is anyone aware of what is holding us back from having it in nixpkgs? Otherwise I maybe have to see if I can make nixpkgs-fmt adopt the new formatting RFC, so there is an implementation that can work everywhere.
Otherwise I maybe have to see if I can make nixpkgs-fmt adopt the new formatting RFC
To be frank, you'd have an easier time simply rewriting the nixfmt code base in Rust from scratch.
I don't know much about the Haskell ecosystem, so I can't really help you with the other points. Is there anything that could be done with emulation, or WASM support?
WASM support might be an option. Although the nixpkgs build would than need to pull a wasm binary...
For boostraping GHC on RISC-V we need binary packages or a cross-built native GHC.
I was able to cross compile nixfmt some years ago. Should be still possible (might need the haskell.compiler.ghc*: fix libffi cross dependency commit)?
You can join the effort in matrix:#riscv:nixos.org.
(discussed in the formatting team)
This is more of a Nixpkgs issue. Once Nixpkgs supports this, nixfmt could also be made to work. Once it does work, you're welcome to integrate it into CI to prevent it breaking in the future.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/formatting-team-meeting-2024-04-02/42658/1