-
Notifications
You must be signed in to change notification settings - Fork 12
Support Nix build for all Clash-GHC supported versions #164
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
Conversation
230711a to
f788434
Compare
f788434 to
b055cc9
Compare
|
Me and Diego discussed this PR some more in PMs. I am not aware of a way to resolve this within Nix, it is caused by Cabal prioritizing sources mentioned in I think it's best to have this behavior documented in the README and that's the best we can do, opinions on this @DigitalBrains1 ? |
b055cc9 to
5d87598
Compare
|
I am not aware of a better way to do this than "If you use Nix, remove |
5d87598 to
1acc9e5
Compare
I've added it as a comment above the devShell itself in the flake. I wanted to originally add it to the README but I couldn't find an appropriate place to mention it. (The entire README feels more a guide on Df than a README for the repository in my opinion anyways) |
See: https://github.com/clash-lang/clash-cores/blob/main/clash-cores.cabal#L85 The same issue applies for clash-protocols
1acc9e5 to
8b076fc
Compare
diegodiv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's basically good for me, and I left two suggestions for improvement.
5c9d2c6 to
5de4704
Compare
Instead of only supporting the 'default' ghc version of clash-compiler, it now supports the same set of ghc versions as clash-compiler itself. More about why this is a problem can be found at (clash-lang/clash-compiler#2987) It also addresses the Cabal-Nix bug where Setup.hs improperly gets flags set. This problem also persists in clash-cores and has been worked around with (https://github.com/clash-lang/clash-cores/blob/main/clash-cores.cabal#L85).
5de4704 to
e08ca82
Compare
diegodiv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
Restructures everything Nix related to be more similar to how clash-protocols and clash-circuits have it setup. This means it now uses flakes, removes all the 'old style' Nix files and applies the GHC patches mentioned in clash-cores.cabal prior to this commit. All of this is very similar to how it is done in clash-lang/clash-protocols#164
Restructures everything Nix related to be more similar to how clash-protocols and clash-circuits have it setup. This means it now uses flakes, removes all the 'old style' Nix files and applies the GHC patches mentioned in clash-cores.cabal prior to this commit. All of this is very similar to how it is done in clash-lang/clash-protocols#164
Restructures everything Nix related to be more similar to how clash-protocols and clash-circuits have it setup. This means it now uses flakes, removes all the 'old style' Nix files and applies the GHC patches mentioned in clash-cores.cabal prior to this commit. All of this is very similar to how it is done in clash-lang/clash-protocols#164
Restructures everything Nix related to be more similar to how clash-protocols and clash-circuits have it setup. This means it now uses flakes, removes all the 'old style' Nix files and applies the GHC patches mentioned in clash-cores.cabal prior to this commit. All of this is very similar to how it is done in clash-lang/clash-protocols#164
Restructures everything Nix related to be more similar to how clash-protocols and clash-circuits have it setup. This means it now uses flakes, removes all the 'old style' Nix files and applies the GHC patches mentioned in clash-cores.cabal prior to this commit. All of this is very similar to how it is done in clash-lang/clash-protocols#164
Restructures everything Nix related to be more similar to how clash-protocols and clash-circuits have it setup. This means it now uses flakes, removes all the 'old style' Nix files and applies the GHC patches mentioned in clash-cores.cabal prior to this commit. All of this is very similar to how it is done in clash-lang/clash-protocols#164
Restructures everything Nix related to be more similar to how clash-protocols and clash-circuits have it setup. This means it now uses flakes, removes all the 'old style' Nix files and applies the GHC patches mentioned in clash-cores.cabal prior to this commit. All of this is very similar to how it is done in clash-lang/clash-protocols#164
Restructures everything Nix related to be more similar to how clash-protocols and clash-circuits have it setup. This means it now uses flakes, removes all the 'old style' Nix files and applies the GHC patches mentioned in clash-cores.cabal prior to this commit. All of this is very similar to how it is done in: clash-lang/clash-protocols#164
Restructures everything Nix related to be more similar to how clash-protocols and clash-circuits have it setup. This means it now uses flakes, removes all the 'old style' Nix files and applies the GHC patches mentioned in clash-cores.cabal prior to this commit. All of this is very similar to how it is done in: clash-lang/clash-protocols#164
Instead of only supporting the 'default' ghc version of clash-compiler,
it now supports the same set of ghc versions as clash-compiler itself.
More about why this is a problem can be found at (clash-lang/clash-compiler#2987).
It also addresses the Cabal-Nix bug where Setup.hs improperly gets flags set. This problem also persists in clash-cores and has been worked around with (https://github.com/clash-lang/clash-cores/blob/main/clash-cores.cabal#L85). However considering it's an issue with Nix specifically, I feel it's more appropriate to patch it within the flake itself.