lf- / de1-soc-nixos

NixOS for the DE1-SoC Cyclone V dev board
MIT License
9 stars 1 forks source link

Update flake dependencies #1

Open crims0nHD opened 2 months ago

crims0nHD commented 2 months ago

Hi,

I recently tried to build this project on a M3 Macbook Pro inside a NixOS virtual machine and it did not work. Afterwards I tried to update the flake and the project wouldn't build on a x86-64 machine now either. Since I am still very new at writing Nix and want to learn about the ecosystem a bit, I wanted to ask if you could bump the flake.nix to a more recent version and fix what has changed since, so I can work on getting the project built on Aarch64-linux.

I really enjoy what you have created here and thank you for all the work you put into this!

Kind regards.

lf- commented 2 months ago

Hi! Thanks for your interest!

I would be surprised if the problem was that the nixos version was too old, but I am really busy and this project is not something that I actively work on.

Here's the most likely culprit for it not building on your machine. I would anticipate that cross-compiling from aarch64-darwin will simply not work at all, and I wouldn't try that. But cross-compiling from aarch64-linux should work, I would anticipate. All my aarch64-linux computers are erm, terrible, so I am not going to test it personally, but I would assume it likely it would work if you change the line below.

https://github.com/lf-/de1-soc-nixos/blob/aa4ee306ab5a63e2e838d4ca7d219165c9695c31/flake.nix#L59

Unfortunately because flakes are bad, there is no way to set this as an "option" to the flake, so the only options are either:

  1. Write a tiny bit of nix code that generates both attributesnixosConfigurations.fpga-build-on-x86_64-linux and nixosConfigurations.fpga-build-on-aarch64-linux or so
  2. Editing the file

I concur that the NixOS version is old though and porting it to a newer one might be worthwhile! Hopefully it should just build on your machine so you can validate on your machine with the known-working one before working on that project.