-
Notifications
You must be signed in to change notification settings - Fork 1
Rework Nix example project & add Nix template #37
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
DigitalBrains1
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.
So there is a pretty major change involved with this. Before this PR, all our starter projects use the latest released version of Clash. With this PR, the Nix starter suddenly starts using Clash master. I don't think we should do that. I think it should keep on using the latest released version, and if currently our clash-compiler repo is not set up to support that (I don't know whether this is the case), we should make it such that it is.
If we decide to switch Nix users to Clash master (you somehow manage to convince me :-), then we should thoroughly document this in these starter projects as it is surely surprising.
daf0bb0 to
4dc09e5
Compare
f8a88e4 to
6b816fb
Compare
|
Alright! This should use version 1.8.4 of clash now :) One notable change is that I renamed Short list of the down/upside of this change: |
8fd8c81 to
ce91289
Compare
a1fd791 to
b41a504
Compare
6e60567 to
62bb6f2
Compare
62bb6f2 to
ce91289
Compare
|
I have no clue why Github keeps closing this PR automatically??? Anyways, a lot of things in this PR changed regarding the Nix/Stack template side of things. The reasoning for this is as follows:
|
DigitalBrains1
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.
Excellent, I think we're there. Just one teeeeensy little edit...
e63c20d to
f992289
Compare
3f14b2e to
cea568f
Compare
Changes the Nix infrastructure inside of simple-nix to use Nix flakes. Adds some more explanation how to include dependencies using Nix and includes a Nix template. All of this was done to make it more user friendly (...for Nix users) to get started with Clash without having to have very deep knowledge of Nix or how Cabal works to make Nix and Cabal work together happily. People who have Nix installed can now use immediately start using Clash with the simple-nix directory by running three commands: ``` mkdir my-project cd my-project nix flake init -t github:clash-lang/clash-starters ``` After this nix command is executed, it will display a 'welcome' message which gives a plain overview of what the Nix related commands do and instructs the user to read the README.md for more information. The original PR is: clash-lang/clash-starters#6 Which I have closed after realizing that repository is essentially just a mirror Co-authored-by: Peter Lebbing <peter@digitalbrains.com>
The old CI did not run the Nix tests (it was silently failing). This resolves that and also removes the publishing of Nix to Cachix as the dependencies should be cached by the dependants themselves, and not the starter projects.
cea568f to
a3ae113
Compare
Nix changes
Changes the Nix infrastructure inside of simple-nix to use Nix flakes. Adds some more explanation how to include dependencies using Nix and includes a Nix template. All of this was done to make it more user friendly (...for Nix users) to get started with Clash without having to have very deep knowledge of Nix or how Cabal works to make Nix and Cabal work together happily.
People who have Nix installed can now use immediately start using Clash with the simple-nix directory by running three commands:
mkdir my-project cd my-project nix flake init -t github:clash-lang/clash-startersAfter this nix command is executed, it will display a 'welcome' message which gives a plain overview of what the Nix related commands do and instructs the user to read the README.md for more information.
Template changes
Aside from the Nix specific changes, we changed the entire way templates are set up. Nix specific templates can now be placed under the
projects-nixsub-directory. This was an essential change to make as Nix and Stack templates are not compatible with each other. Nix and Stack in general do not play very nicely together so dropping Stack support for the Nix related template does not lose much. Files underclash-starters-filesare now also copied verbatim into theclash-startersdirectory.Original PR
The original PR is: clash-lang/clash-starters#6
Which I have closed after realizing that repository is essentially just a mirror
Credits
Big credits to @DigitalBrains1 for his massive help regarding everything really and @rslawson for testing!