neovim-nightly-overlay icon indicating copy to clipboard operation
neovim-nightly-overlay copied to clipboard

Broken config after update

Open naripok opened this issue 3 years ago • 14 comments

I've been using your overlay for a while with success, but after the last flake.lock update it stopped working. I'm pretty new to nix (problems, at least), so sorry if this is not the information needed. I'm open to questions and can help debugging if needed, just let me know :)

flake.lock diff

       "locked": {
-        "lastModified": 1626077712,
-        "narHash": "sha256-e7V+XaxwI3a736mU+8wRtnVTXCTW/nk/fMu0yY7O8vI=",
+        "lastModified": 1625904691,
+        "narHash": "sha256-R+HcHxfAsG3JxdeXvQUjDg6i4VJxjh39SPEGwaLMWi4=",
         "owner": "nix-community",
         "repo": "neovim-nightly-overlay",
-        "rev": "8814fde215d6d34036c55135f33471a0edf07453",
+        "rev": "c2a8577b755101ba3cd5d8b20a1a46f231b76a11",
         "type": "github"
       },

nix-rebuild switch --flake .# output error

error: builder for '/nix/store/7l3svp8r48nmcwywp2c9b3fhj7pcj913-neovim-unwrapped-master.drv' failed with exit code 1;
       last 10 log lines:
       >   necessary.
       >
       > Call Stack (most recent call first):
       >   cmake/FindTreeSitter.cmake:11 (libfind_process)
       >   CMakeLists.txt:393 (find_package)
       >
       >
       > -- Configuring incomplete, errors occurred!
       > See also "/build/xi1i14wkbr019jzy26vpfwg6ijvxjs1v-source/build/CMakeFiles/CMakeOutput.log".
       > See also "/build/xi1i14wkbr019jzy26vpfwg6ijvxjs1v-source/build/CMakeFiles/CMakeError.log".
       For full logs, run 'nix log /nix/store/7l3svp8r48nmcwywp2c9b3fhj7pcj913-neovim-unwrapped-master.drv'.
error: 1 dependencies of derivation '/nix/store/dqsz11wfx9603np13ksmb2ccqsqhplva-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/s2adqjdqbl8ghbmh93mqpzs51da0pi29-nixos-system-tau-21.05.20210716.a165aec.drv' failed to build

last CMakeError.log lines

-- Found Msgpack: /nix/store/70lrzxzjnx9pcy3hjwrycj1gq0ybbny5-msgpack-3.2.0/lib/libmsgpackc.so
(found suitable version "3.2.0", minimum required is "1.0.0")
-- Found LibLUV: /nix/store/k6225k892h50g6ykn4njn48i5yzyvkmy-luajit-2.1.0-2020-12-28-luv-1.30.0
-0/lib/lua/5.1/luv.so (Required is at least version "1.30.0")
CMake Error at cmake/LibFindMacros.cmake:263 (message):
  REQUIRED PACKAGE NOT FOUND

  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
  nvim.

  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
  necessary.

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

naripok avatar Jul 16 '21 19:07 naripok

Are you overriding the flake inputs or something to an old version of nixpkgs? The flake works fine for me, and bundles it's own nixpkgs version.

mjlbach avatar Jul 16 '21 20:07 mjlbach

@mjlbach Thx for the response!

  inputs = {
    nixpkgs.url = "nixpkgs/nixos-21.05";
    neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
  };
  ...
  overlays = [
    inputs.neovim-nightly-overlay.overlay
  ];

I was using nixpkgs/nixos-21.05. I've switched to unstable for now. If nobody else has this problem, then it is probably my bad, so we can close this issue if you like.

naripok avatar Jul 19 '21 19:07 naripok

I'm still seeing this issue. I've tried at many different commits, with- and without input following, but I have been unable to find a configuration that works. @naripok Just to confirm -- for you it only occurs when having the nixpkgs input follow an older version?

jonascarpay avatar Jul 20 '21 16:07 jonascarpay

@jonascarpay Hey mate, sorry for the delayed response.

I can't even build without fixing the nixpkgs input. It fails while trying to start pmount service. Fixing on unstable is bugging the shit out of my system now, so I can't event test that.

naripok avatar Jul 26 '21 11:07 naripok

Did any of you find out how to fix this issue? same thing happening here.

My flake.nix for anyone wondering: https://github.com/shaunsingh/vimrc-dotfiles/blob/main/flake.nix

shaunsingh avatar Aug 19 '21 02:08 shaunsingh

@shaunsingh Hey mate, I haven't fixed the issue no, sorry. However, I had to get back to 21.05 (because unstable caused other problems to me) and I'm looking forward to being able to use neovim 5.0 again. I'm going to check if I can make some progress on this and will get the results back here.

naripok avatar Aug 19 '21 20:08 naripok

Hey guys! Follow up from yesterday: As @mjlbach suggested, the flake works fine if you don't fix the nixpkgs version on your own system flake. :+1: However, I need to stay on 21.05 because jumping to unstable brings me other problems (messes with my graphic stack installation, blocking me from mining ethereum).

What I've tried:

  • fixing nixpkgs input on my system's flake to 21.05 and using the overlay (won't work)
  • not fixing the system's flake nixpkgs input and using the overlay (works, but not the desired use case)
  • fixing the system's flake AND the overlay flake nixpkgs input to 21.05 (won't work, same error)
  • fixing the system's flake input and removing the overlay nixpkgs input (won't work, same error)

I haven't had the time to mess with it properly yet, but gonna try to do it today. Also, any help from someone who actually knows what he is doing would be really appreciated :rofl:

naripok avatar Aug 20 '21 11:08 naripok

Just to clarify, you should not override this flake's input. It doesn't matter if you are on nixos 21.05 or nixos-unstable, the flake bundles its own nixpkgs

mjlbach avatar Aug 20 '21 12:08 mjlbach

OK! I've managed to get neovim-nightly working with the fixed 21.05 input by using the neovim's contrib flake's overlay instead of this one. My final flake:

{
  # ...

  inputs = {
    nixpkgs.url = "nixpkgs/nixos-21.05";
    neovim.url = "github:neovim/neovim?dir=contrib";
  };

  outputs = { self, nixpkgs, ... }@inputs:
    let
      system = "x86_64-linux";

      pkgs = import nixpkgs {
        inherit system;
        config = { allowUnfree = true; };
      };

      overlays = [
        inputs.neovim.overlay
      ];

      lib = nixpkgs.lib;

    in {
      nixosConfigurations = {
        tau = lib.nixosSystem {
          inherit system;

          modules = [
            ./nix/config/configuration.nix
            { nixpkgs.overlays = overlays; }
          ];
        };
      };
    };
}
 ∴ vi --version 
NVIM v0.6.0-dev
Build type: Release
LuaJIT 2.1.0-beta3
Compilation:
Compiled by nixbld

BTW, the flake in this repo builds fine with nix build, and only fails when I try to use the overlay within my system config. I have absolutely no idea why, tho...

Cheers!

naripok avatar Aug 22 '21 11:08 naripok

FYI this is the neovim contrib flake, just with its inputs overridden

mjlbach avatar Aug 22 '21 12:08 mjlbach

Yes, that is where I got the idea for using their flake from: https://github.com/nix-community/neovim-nightly-overlay/blob/master/flake.nix#L7

@mjlbach Sorry for the low IQ question, but can you please clarify what is the value added by the overwritten inputs? I found in the nixOS wiki that they mention this flake and the neovim-contrib's one, but there is no info about why to prefer one over another.

naripok avatar Aug 23 '21 10:08 naripok

The point of this repo is to provide a binary cache. With nix, you will only get substitutions if the build inputs match. This repo tries to minimize the duplication on your system by providing an up-to-date nixpkgs input (not the pinned one we use in the contrib flake) and also handles pushing the builds to cachix. I also maintain the contrib one (along with teto)

mjlbach avatar Aug 23 '21 13:08 mjlbach

Cool! Thank you very much for the clarification and for the good work, dude! :rocket:

naripok avatar Aug 23 '21 14:08 naripok

If you want to use this flake with a stable branch, e.g. nixpkgs-21.05-darwin in my case, then don't call it nixpkgs in your flake because it would override the nixpkgs set of neovim-nightly and then you can get the error mentioned by @naripok in https://github.com/nix-community/neovim-nightly-overlay/issues/120#issue-946531032.

Instead name it something else, e.g. stable . Here is my flake for darwin using nix-darwin:

{
  description = "My Darwin System";

  inputs = {
    stable.url = "github:nixos/nixpkgs/nixpkgs-21.05-darwin";
    darwin.url = "github:lnl7/nix-darwin/master";
    darwin.inputs.nixpkgs.follows = "stable";
    neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
  };

  outputs = { self, nixpkgs, darwin, stable, neovim-nightly }:
    {
      darwinConfigurations."matterhorn" = darwin.lib.darwinSystem {
        system = "x86_64-darwin";
        inputs = { inherit neovim-nightly; };
        modules = [ ./darwin-configuration.nix ];
      };
    };
}

Inside ./darwin-configuration.nix:

...
nixpkgs.overlays = [ inputs.neovim-nightly.overlay ];
...

@Naripok's flake from here https://github.com/nix-community/neovim-nightly-overlay/issues/120#issuecomment-903256567 would look something like this then:

{
  # ...

  inputs = {
    stable.url = "nixpkgs/nixos-21.05";
    neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
  };

  outputs = { self, nixpkgs, stable, ... }@inputs:
    let
      system = "x86_64-linux";

      pkgs = import stable {
        inherit system;
        config = { allowUnfree = true; };
      };

      overlays = [
        inputs.neovim-nightly.overlay
      ];

      lib = stable.lib;

    in {
      nixosConfigurations = {
        tau = lib.nixosSystem {
          inherit system;

          modules = [
            ./nix/config/configuration.nix
            { stable.overlays = overlays; }
          ];
        };
      };
    };
}

tricktron avatar Oct 31 '21 18:10 tricktron