lib.systems: add various has* flags useful for embedded systems#352629
lib.systems: add various has* flags useful for embedded systems#352629kuruczgy wants to merge 1 commit intoNixOS:stagingfrom
Conversation
This requires two main changes: - An update to the nixpkgs patch. It is now based on this draft PR: NixOS/nixpkgs#352629 - An update to the Lean runtime, as Lean is updated to v4.10.0. The changes come from Lean commit 0a1a855ba80e51515570439f3d73d3d9414ac053.
|
Thank you both for the feedback. Before continuing with this, I would like some feedback from someone on the high level concept first. (E.g. the concept is fine, and we don't need to rethink and use some other approach.) If it's confirmed that this is desirable change, I can update the PR to a non-draft quality one. (Split the two linunwind cases, fix the typos, fix the formatting, rebase onto latest master.) |
|
I think the concept is fine. To convince more people I would suggest showing a use for each new condition. |
4729f93 to
e76ac5d
Compare
|
Updated, the major new change is that I now have two separate If someone is interested in somewhat of a "real world" use-case for this code, here is my example which originally motivated these changes: https://github.com/kuruczgy/lean-esp32/blob/c912a815d079cd5a3d029771c247e692f5516b71/flake.nix Notably, targeting embedded platforms using nixpkgs is still very rough, so I expect several more changes to be needed, for example support for picolibc or some saner defaults for the hardening flags (currently a lot of them can blow up code size). |
379db2a to
d6e71a3
Compare
|
I believe it should be good now, I changed all references to |
|
This looks great! I like how it's exposing all these Darwin/FreeBSD inconsistencies. I've reviewed the lib changes, and ack the package changes but haven't thoroughly reviewed them. |
|
I need to look over the Darwin changes more closely, but some of the changes appear to be adding the |
| # Whether the system provides its own libunwind implementation that we | ||
| # should use. | ||
| hasSystemLibunwind = final.isFreeBSD || final.isDarwin; |
There was a problem hiding this comment.
I don't think this works since we have multiple unwinder implementations.
- LLVM libunwind
- Darwin libunwind
- non-GNU libunwind
- GCC's unwinder
Instead, I think treating it like an enum like #365057 does works best imo.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.