tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
748 stars 74 forks source link

Fix Rust in kernel #69

Closed QuentinI closed 1 year ago

QuentinI commented 1 year ago

Fixes #63

Depends on #68

This is certainly not how it should be fixed. The bindgen version detection should ideally be fixed upstream, and the cross-references between dev and out should be properly addressed. Therefore, I'm not sure if you'll want to merge this. However, I wanted to submit anyway it so that other people could use it in the meantime

tpwrules commented 1 year ago

Thank you very much for these fixes. I had to patch them up a bit to avoid issues when building without Rust. But everything works now.

I don't see any obvious issues with the approach. Is this something that needs to be fixed in nixpkgs upstream? I guess they do not have any Rust kernel infrastructure yet. I will test in the future to see if this can be removed, not sure what would be wrong in the kernel build to have caused this.

QuentinI commented 1 year ago

I don't see any obvious issues with the approach.

I don't think it's technically wrong, just kind of unsatisfying.

If I understood what's going on correctly it's the kernel upstream who should ideally fix their script, because it is buggy and reads wrong version when run in a directory which contains a version.

And removing references is just annoying, since a lot of work is done to ensure everything is properly stripped at build stage, and I would prefer to solve the Rust part there as well. Unfortunately, that's a bit above my pay grade for now