Coder Social home page Coder Social logo

[BUG] `error: Alias bash-language-server is still in node-packages.nix` error when building on current nixos-unstable about nixvim HOT 20 CLOSED

Daru-san avatar Daru-san commented on August 29, 2024 12
[BUG] `error: Alias bash-language-server is still in node-packages.nix` error when building on current nixos-unstable

from nixvim.

Comments (20)

GaetanLepage avatar GaetanLepage commented on August 29, 2024 4

Fixed in #1719

from nixvim.

Toshiro00 avatar Toshiro00 commented on August 29, 2024 3

The issue is we are using an old package name for the bash language server.

This should only affect you if you are overriding nixvim's nixpkgs lock (i.e. nixvim.inputs.nixpkgs.follows).

Until we fix this in See #1696, you should either remove/comment out your "nixvim follows" line, or rollback your flake.lock to an older nixpkgs revision.

EDIT: upstream PR is NixOS/nixpkgs#319882

I had same issue with "error: Alias @astrojs/language-server is still in node-packages.nix" just removed "nixpkgs.follows" solved the issue.

from nixvim.

MattSturgeon avatar MattSturgeon commented on August 29, 2024 1

The issue is we are using an old package name for the bash language server.

This should only affect you if you are overriding nixvim's nixpkgs lock (i.e. nixvim.inputs.nixpkgs.follows).

Until we fix this in See #1696, you should either remove/comment out your "nixvim follows" line, or rollback your flake.lock to an older nixpkgs revision.

EDIT: upstream PR is NixOS/nixpkgs#319882

from nixvim.

Amelia-Mowers avatar Amelia-Mowers commented on August 29, 2024 1

Just had this and fixed this issue by removing nixvim.inputs.nixpkgs.follows but you have to also run nix flake update, or similar command to just update that one flake, as well. Which was not immediately obvious to me.

from nixvim.

MattSturgeon avatar MattSturgeon commented on August 29, 2024 1

Just had this and fixed this issue by removing nixvim.inputs.nixpkgs.follows but you have to also run nix flake update, or similar command to just update that one flake, as well. Which was not immediately obvious to me.

If you want to apply input changes to flake.lock without also updating, you can use nix flake lock.

Incidentally, if you want to change what an input points to without modifying your flake.nix (e.g. to temporarily test a PR or revert to an old rev) you can use nix flake lock --override-input <input-name> <input-url>.

from nixvim.

djacu avatar djacu commented on August 29, 2024 1

I was still getting the error after removing the "follows" line. I ended up pinning my nixpkgs input to the same rev as the nixpkgs input for nixvim and that worked fine as expected.

from nixvim.

MattSturgeon avatar MattSturgeon commented on August 29, 2024 1

I was still getting the error after removing the "follows" line

Did you run nix flake lock after removing the follows?

from nixvim.

MartinEekGerhardsen avatar MartinEekGerhardsen commented on August 29, 2024 1

After removing the follows and running both nix flake update and nix flake lock multiple times, I still get the same build error. Is there any information I can provide to try to find a solution to this, or would it be easiest to wait for #1696?

from nixvim.

MartinEekGerhardsen avatar MartinEekGerhardsen commented on August 29, 2024 1

If follows is not having an effect, try overriding your main nixpkgs input (the one that becomes pkgs in your modules) to point to a nixpkgs without this issue. We're currently locked to 57d6973abba7ea108bac64ae7629e7431e0199b6.

Using this commit, I no longer get this error, both with and without follows. Thank you!

I'm curious which installation method you use for nixvim (nixos, hm, darwin, standalone), it may be this determines whether nixvim evaluate using its own nixpkgs input or the pkgs of a wider module system.

I'm using a standalone nixvim flake on my system running NixOS x86_64-linux and just add the output of the standalone flake to my system packages.

from nixvim.

MattSturgeon avatar MattSturgeon commented on August 29, 2024 1

The update has now made it into nixpkgs. Now #1702 is stopping me from building, but this is a separate issue.

It's not yet in nixos-unstable. It's in all the other channels though: https://nixpk.gs/pr-tracker.html?pr=319882

nixos-unstable is currently 3 days behind master

from nixvim.

dlip avatar dlip commented on August 29, 2024 1

Since I thought it might be of use to others, I fixed the nixpkg dependency overriding problem by removing the home manger module and just used nixvim as a standalone overlay. Getting extra plugins working was a little tricky:

I add it to my overlay and add my extraPluginsSrc vim plugin inputs to extraSpecialArgs. It uses a trick to get all the inputs starting with "vimplugin-", but you can just pass in an attrset manually if you like.

https://github.com/dlip/nixconfig/blob/e19874c0f1326390708f7003af4c2e07ecf3e45d/overlays/default.nix#L43-L48

I then build them using the nixpkgs in nixvim

https://github.com/dlip/nixconfig/blob/e19874c0f1326390708f7003af4c2e07ecf3e45d/overlays/nixvim/default.nix#L6-L12

And pass in to extraPlugins

https://github.com/dlip/nixconfig/blob/e19874c0f1326390708f7003af4c2e07ecf3e45d/overlays/nixvim/default.nix#L886-L890

then you can just use

home.packages = [ nixvim ];

from nixvim.

GaetanLepage avatar GaetanLepage commented on August 29, 2024 1

I had same issue with "error: Alias @astrojs/language-server is still in node-packages.nix" just removed "nixpkgs.follows" solved the issue.

Addressed in 8ff21b7

from nixvim.

niksingh710 avatar niksingh710 commented on August 29, 2024

i have only nixvim.url = "github:nix-community/nixvim"; in my inputs. it has been generated by nix flake init -t github:nix-community/nixvim i don't see any option where it is specified to be nixvim.inputs.nixpkgs.follows";

still having the same issue.

from nixvim.

bearfm avatar bearfm commented on August 29, 2024

I removed the 'follows' line from mine, went to the directory with my NixOS config, and ran sudo nix flake update , and then ran sudo nixos-rebuild --flake . switch --upgrade and it built with no issues.

from nixvim.

MattSturgeon avatar MattSturgeon commented on August 29, 2024

After removing the follows and running both nix flake update and nix flake lock multiple times, I still get the same build error.

If follows is not having an effect, try overriding your main nixpkgs input (the one that becomes pkgs in your modules) to point to a nixpkgs without this issue. We're currently locked to 57d6973abba7ea108bac64ae7629e7431e0199b6.

The upstream PR has made it to nixos-unstable-small, so that channel may also work (hopefully, anyway).

Is there any information I can provide to try to find a solution to this

I'm curious which installation method you use for nixvim (nixos, hm, darwin, standalone), it may be this determines whether nixvim evaluate using its own nixpkgs input or the pkgs of a wider module system.

from nixvim.

meck avatar meck commented on August 29, 2024

I'm also seeing this where I got a custom nixvim flake that wraps nixvim this has

nixpkgs.follows = "nixvim/nixpkgs";

And just running nix run .# works. But if i add it to my nixos config which just have mvim.url = "github:meck/mvim" (no follow in the input) this error pops up as if it using the general nixos nixpkgs version, nixos-unstable.

from nixvim.

purepani avatar purepani commented on August 29, 2024

The update has now made it into nixpkgs. Now #1702 is stopping me from building, but this is a separate issue.

from nixvim.

iSma avatar iSma commented on August 29, 2024

Just curious, is there a reason why setting plugins.lsp.servers.bashls.enable = false; and/or overriding plugins.lsp.servers.bashls.package still triggers this issue? I had a quick look at _mk-lsp.nix and from my understanding package shouldn't get evaluated if enabled is false.

from nixvim.

MattSturgeon avatar MattSturgeon commented on August 29, 2024

Just curious, is there a reason why setting plugins.lsp.servers.bashls.enable = false; and/or overriding plugins.lsp.servers.bashls.package still triggers this issue? I had a quick look at _mk-lsp.nix and from my understanding package shouldn't get evaluated if enabled is false.

I haven't looked at this specific case, but NixOS modules often evaluate a lot of branches that might not get evaluated in non-module nix expressions. This is done to ensure more parts of your config are valid, even some parts you aren't using.

For instance, lib.mkIf isn't actually using if then else, instead it just returns an attrset with a condition attribute and a config attribute. The module system itself then evaluates the config, regardless of condition being successful. It just only gets merged into the final config if the condition was successful.

from nixvim.

dlip avatar dlip commented on August 29, 2024

I suspect this might be due to home-manager.useGlobalPkgs = true; but is breaks too many things for me to confirm this

from nixvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.