-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
flake: use dream2nix within nix-cargo-integration #1758
flake: use dream2nix within nix-cargo-integration #1758
Conversation
I'm not sure whether this should be a draft PR or not, since it's a branch of nix-cargo-integration and also I see many of these when running
(and the helix flake doesn't appear to export a |
FYI, I merged the branch sometime ago, so you should be able to use And the trace warnings shouldn't cause anything to break. I *think" they were already removed from dream2nix, but I'm not sure. |
@the-mikedavis thanks for tagging me and jumping on this. I have a local copy, so I did a I'm confused why this adds |
I tracked that down to that nix derivations are using gcc as the underlying C compiler, even though on MacOS it needs to be using clang. I haven't had time to figure out how to remedy that. I was hoping using dream2nix would solve it. |
It's a whole controversy in Nix 🙃 IIRC it went something like: flakes added support for fetching submodules for the #1659 will address this and make it much faster. Plus I have some ideas to beat the dead horse after that :)
Ah hmm, I wonder how tree-sitter handles this - we're currently using very similar code to what they do. We should be able to customize that in the flake part of #1659 pretty easily though |
Thanks. It finished and started building. I am getting the error:
This could be because I'm using sandboxed nix builds (with |
bah all that waiting for another error 😅 I am on nixos where I think the sandboxing is the default, so I think it might be something darwin-specific? I might be able to borrow an M1 mac and do some testing. I suspect the builder for a crates deps is trying to access |
Could you try using the |
Ah that would make sense if darwin is using something other than |
Yes, that avoids the error that |
It looks like I might have been slightly wrong about the current error. It seems like GCC is fine, it's actually a problem with range of an integer (?). First error here:
Entire log here: @the-mikedavis I ran both those and neither got past that error. It looks like both those used gcc, but the log I attached is from the first. Thanks for putting them up to try! |
That's good to hear. The PR that fixes the issue is merged to dream2nix now, and I have updated |
With some looking around, I see NixOS/nixpkgs#127608 (comment) for the |
Ok I've got some more commits to try out @jdahm! (Btw no rush on these, and thanks for all your testing :)
From path in the error message though
I suspect that this might not fix it. We might need a way to add arguments to the deps builder (here in dream2nix I think), but if any of the |
This should be possible via just adding a |
Oh sweet! In that case I have another revision for testing: |
Thanks for continuing to hack on this! Same error:
Also, similar error. This one almost completes, but hits a link error at the very last step! Log here. |
Ah so close! This is starting to seem like an issue upstream in cc-rs. Sounds similar to
I'm starting to run out of ideas but we might be able to fiddle with some of the CC setup in |
https://github.com/nix-community/dream2nix is a fairly new and cool-looking project for adapting upstream package manager outputs (lockfiles mostly it would seem) for nix. This should improve the ability to cross-compile. As a more concrete measure of improvement, `nix flake check' now succeeds 🎉
7b19f8b
to
611d691
Compare
@the-mikedavis Thanks again. I checked and a clone of helix builds without error when using cargo not driven by the nix flake. So, as you say I'll do some digging into dream2nix/rust-overlay/cargo-nix-integration when I find time. |
Should I be concerned with this:
Also, thank you for all the work on this from all folks! |
No, that shouldn't matter in this case. The translator for Cargo.lock in dream2nix is fast enough in my experience. I think there should be a way to disable those warnings, but afaik right now they should not pop up after seeing them once (although im not sure how long that lasts). |
closes #1757
possibly connects #1647 but I don't have an ARM machine to test on. @jdahm would you mind trying
nix run github:the-mikedavis/helix/665e01b4639f87de1f33a1cfa99c97d6a3549fd0
? I suspect the tree-sittergcc
failure is unrelated but it's worth a shot.builds on @yusdacra's wonderful work - I just added back the
shell
part. I watched that presentation on dream2nix and I'm pretty excited 😄