SOLVED: Overlay for neovim nightly builds

This is more a cry for help than a question, I’ve been attempting to make my own overlays for neovim so I can install it from their nightly releases. I’ve tried nix-neovim-nightly, the overlay from @teto (here) and my own homebrewed version, but I either get old versions, the derivation doesn’t compile or a

  (Required is at least version "1.30.0")

when compiling. Anyone here using a nightly release of neovim that I could take a look at/steal?

maybe you get an old libuv, you could try the overlay with nixos-unstable to see if it fixes your problem.

Do you have an example on how to do that? Not sure how you’d create an overlay for a unstable package.

EDIT: I just switched my whole system from stable to unstable and the overlay works fine now.

I now have an overlay with cachix support providing neovim nightly builds since the old overlay was archived:

This is not the nightly

@realisation What do you mean?

Not sure how that is setup, but the current commit referenced in that repo is ca6815115c79da62b845f479f0cdd765bdbfb700, which is from the 8th (5 days ago).

Which is pretty recent, but the delta is enough to give errors with the treesitter plugin. Not a bit deal though: I just pinned the plugin to a slightly older commit.

@mredaelli Sorry about that, the CI has been broken for awhile due to niv/github issues so I’ve been manually bumping it. Hopefully it’s fixed now.

1 Like

Are you kidding? :slight_smile: Thank you for the awesome service!

If you want to build it yourself, you could create an overlay like this:

[ (self: super: {

  tree-sitter-updated = super.tree-sitter.overrideAttrs(oldAttrs: {

    version = "0.17.3";
    sha256 = "sha256-uQs80r9cPX8Q46irJYv2FfvuppwonSS5HVClFujaP+U=";
    cargoSha256 = "sha256-fonlxLNh9KyEwCj7G5vxa7cM/DlcHNFbQpp0SwVQ3j4=";

    postInstall = ''
      PREFIX=$out make install


  neovim-unwrapped = super.neovim-unwrapped.overrideAttrs (oldAttrs: rec {
    name = "neovim-nightly";
    version = "0.5-nightly";
    src = self.fetchurl {
      url = "";
      sha256 = "12q48hq9bjq22gkn3qqga8nnlz89l700n4zgfp6r8fm5dzph3l30";

    nativeBuildInputs = with self.pkgs; [ unzip cmake pkgconfig gettext tree-sitter-updated ];



I guess you need to update tree-sitter dependency version accordingly in the future. Credit for the tree-sitter part should of course go to mjlbach. Thanks for creating the repository :slight_smile:

This worked for me (as of today)

# ~/.config/nixpkgs/overlays/neovim.nix
self: super: {
  neovim-unwrapped = super.neovim-unwrapped.overrideAttrs (oldAttrs: {
    version = "master";
    src = builtins.fetchGit {
      url =;
    nativeBuildInputs = super.neovim-unwrapped.nativeBuildInputs ++ [ super.tree-sitter ];


I had this before and it uses to work. But today I tried updating it and got the following error:

CMake Error at cmake/LibFindMacros.cmake:263 (message):

  We could not find development headers for TreeSitter.  Do you have the
  necessary dev package installed? This package is REQUIRED and you need to
  install it or adjust CMake configuration in order to continue building

  Relevant CMake configuration variables:

    TreeSitter_INCLUDE_DIR=<not found>
    TreeSitter_LIBRARY=<not found>

  You may use CMake GUI, cmake -D or ccmake to modify the values.  Delete
  CMakeCache.txt to discard all values and force full re-detection if

Call Stack (most recent call first):
  cmake/FindTreeSitter.cmake:11 (libfind_process)
  CMakeLists.txt:377 (find_package)

-- Configuring incomplete, errors occurred!
# ~/.config/nixpkgs/overlays/neovim.nix
self: super: {
  neovim-unwrapped = super.neovim-unwrapped.overrideAttrs (oldAttrs: {
    version = "master";
    src = super.fetchFromGitHub {
      owner = "neovim";
      repo = "neovim";
      rev = "4bc74c24318a544f30a9d2431dbd969f9d5cd0f5";
      sha256 = "0ydydvgi4lyvwsq58ljva5jy8hv2x0gv3mr04pk6wb0c35ilxp0k";
    buildInputs = oldAttrs.buildInputs ++ [ super.tree-sitter ];

Also note that you can also set rev to “nightly”. Because it didn’t work on nightly, I tried an older commit. But that specific commit has nothing to do with the issue.

I fixed the issue by running nix-env -iA nixos-unstable.neovim instead of nix-env -iA nixos.neovim.