-
-
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
The nix flake is broken after pull request #1758 #1779
Comments
I think the problem is described here: NixOS/nix#6013, which was provoked by yusdacra/nix-cargo-integration#57, was fixed in NixOS/nix#6036, and it looks like it was released under https://github.com/NixOS/nix/releases/tag/2.7.0 yesterday. But it doesn't look like nix 2.7.0 has made it to the unstable channel yet. Does this affect |
It's also worth giving this a try on the latest master since #1659 is now merged |
I had the same problem (tried with latest master) # Helix editor
helix.url = "github:helix-editor/helix";
helix.inputs.nixpkgs.follows = "nixpkgs";
nci.url = "github:yusdacra/nix-cargo-integration";
nci.inputs.nixpkgs.follows = "nixpkgs";
helix.inputs.nixCargoIntegration.follows = "nci"; |
I'm still failing to build on master. output of
|
Ok, this worked with Cachix. |
I just tried upgrading to nix 2.7.0 in my dotfiles flake and it correctly handles the transitive dependency when adding helix (see here). So when 2.7.0 is released there will be no need for the workaround above with the extra input on Locally I see (albeit |
I'll reopen if there are problems after 2.7.0 |
Is this a bug in Helix?
(nix proceeds to download every tree-sitter submodule) |
Ah that's from The grammars are fetched now with |
Ok, I see. Nix is caching properly. I'll close this issue. |
Updating helix takes an awfully long time now... maybe Cachix would work better if the call to |
I would expect the grammars to cache just as well as any of the cargo dependencies or the resulting helix artifact but I just tried a fresh install and it does seem to fetch every git repository from scratch. I also see it downloading each In any case, I think we could probably add another package to the flake called |
This adds lots of state that needs to be manually upkept. Copying to the home directory isn't possible with nix either, without things like home-manager. I think the best option is to try to fix the repository fetching instead. |
I think we can't do the fetching any better as long as we use git repositories for grammars. I have some ideas for a centralized package registry for grammars that could solve some of these problems but it's a long way off. |
Maybe a solution could be to use git submodules? |
It used to be that each grammar repository was a submodule on this repo, but it was awkward to use them in regular development (they were very slow to clone and git doesn't update their revisions when switching branches) and nix doesn't consider submodules of a flake's repository to be part of the input (it did briefly but the behavior was reverted). Submodules did solve the fixed-output-derivation problem, though, because you could either have the helix repo as the input of the flake (here) or what we had earlier was a This: https://github.com/helix-editor/tspm might be a little less "long way off" than I thought. I bet it wouldn't be too hard to integrate and it would solve both fast downloads (the packages are very small) and the fixed-output-derivation problem because the URLs for artifacts contain the sha256s. |
My cache is expiring, and I'm having to redownload grammars every hour for simple rebuilds. Rebuilds are now taking 10 to 15 minutes, and this is really a problem. |
I'm going to be pinning helix to some commit before #1659 for now to keep my rebuilds. |
#1872 was merged recently which improves the time it takes to fetch grammars. I suspect that the grammars will still have to be re-downloaded (I think this is related to the tarball-ttl) but re-downloading them will now be much faster. I'm still investigating fixing this properly (I think with fixed-output-derivations). |
I've not used it long enough to experience the grammars issue yet, but just wanted to note that i was experiencing similar problems trying to use this repo's flake on NixOS and NixDarwin. Upgrading from nixpkgs-21-05 to nixpkgs-21-11 solved it on NixOS, and for NixDarwin changing to Quite the adventure since a lot of errors were coming from unknown (to me) origins. |
Reproduction steps
Attempting
nix flake update
with any commit after pull request #1758 results in the errorEnvironment
Platform: Linux
"x86_64-linux"
Linux 5.15.25, NixOS, 22.05 (Quokka)
yes
yes
nix-env (Nix) 2.6.1
Helix version: f31e85a
The text was updated successfully, but these errors were encountered: