helix: The nix flake is broken after pull request #1758

Reproduction steps

Attempting nix flake update with any commit after pull request #1758 results in the error

error: input 'helix/nixCargoIntegration/devshell/nixpkgs' follows a non-existent input 'nixCargoIntegration/nixpkgs'

Environment

  • Platform: Linux

    • system: "x86_64-linux"
    • host os: Linux 5.15.25, NixOS, 22.05 (Quokka)
    • multi-user?: yes
    • sandbox: yes
    • version: nix-env (Nix) 2.6.1
  • Helix version: f31e85aca43dc7d1c5aa3e20add0f1126b112b0f

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 20 (19 by maintainers)

Commits related to this issue

Most upvoted comments

I had the same problem (tried with latest master) And my current workaround is:

# 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 going to be pinning helix to some commit before #1659 for now to keep my rebuilds.

I think we can’t do the fetching any better as long as we use git repositories for grammars. fetchGit is very slow and not a fixed-output-derivation. fetchTree is pretty good: you can shallow-clone which is much faster but it’s also not a fixed-output-derivation. fetchFromGitHub would be ideal since it’s even faster than fetchTree (it downloads a tarball instead of using git) and is a fixed-output-derivation, but it’s a no-go because we would need the sha256. And there isn’t much appetite for adding sha256 to languages.toml since it would be nix-specific and isn’t very easy to calculate if you’re not using nix.

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.

Ok, I see. Nix is caching properly. I’ll close this issue.

I’ll reopen if there are problems after 2.7.0

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 nix-cargo-integration. Earlier I tried updating the flake and got the same error about cargo not being available in the stdenv setup script, but I can’t seem to reproduce it now.

Locally I see nix flake update succeeding from within the helix repo, I can depend on helix through the flake, and I can nix flake update my dotfiles flake. Shall we call this closed @erinkim4?

(albeit nix flake check fails, but I think that’s an issue caused by this IFD, see also https://github.com/NixOS/nix/issues/4265)

I had the same problem (tried with latest master) And my current workaround is:

# 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";

Ok, this worked with Cachix.