Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Riscv64 support? #168

Closed
Mic92 opened this issue Mar 19, 2024 · 5 comments
Closed

Riscv64 support? #168

Mic92 opened this issue Mar 19, 2024 · 5 comments

Comments

@Mic92
Copy link
Member

Mic92 commented Mar 19, 2024

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.

@piegamesde
Copy link
Member

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?

@Mic92
Copy link
Member Author

Mic92 commented Mar 19, 2024

WASM support might be an option. Although the nixpkgs build would than need to pull a wasm binary...

@0x4A6F
Copy link
Member

0x4A6F commented Apr 2, 2024

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.

@infinisil
Copy link
Member

(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.

@infinisil infinisil closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
@nixos-discourse
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

5 participants