nix-community / neovim-nightly-overlay

[maintainer=@GaetanLepage, @willruggiano]
https://matrix.to/#/#neovim-nightly-overlay:nixos.org
308 stars 45 forks source link

Build fails #332

Closed mrtnvgr closed 10 months ago

mrtnvgr commented 11 months ago
error: builder for '/nix/store/y5v26pz21gmjph5gzy74jwx9zkwa8m7y-neovim-unwrapped-a5629ab.drv' failed with exit code 1;
       last 10 log lines:
       >   Could NOT find Libvterm: Found unsuitable version "0.3", but required is at
       >   least "0.3.3" (found
       >   /nix/store/flm0i7lbg0msqgdrkpgn69hxc2brb7p0-libvterm-neovim-0.3.2/include)
       > Call Stack (most recent call first):
       >   /nix/store/5h0akwq4cwlc3yp92i84nfgcxpv5xv79-cmake-3.26.4/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE)
       >   cmake/FindLibvterm.cmake:23 (find_package_handle_standard_args)
       >   src/nvim/CMakeLists.txt:31 (find_package)
       >
       > 
       > -- Configuring incomplete, errors occurred!
       For full logs, run 'nix log /nix/store/y5v26pz21gmjph5gzy74jwx9zkwa8m7y-neovim-unwrapped-a5629ab.drv'.
error: 1 dependencies of derivation '/nix/store/2pl3v4jpa5hwr0xa5gxh9m05cmjsb8lp-neovim-a5629ab.drv' failed to build
matt1432 commented 11 months ago

This is a temporary fix I found while we wait for this to be resolved:

Add nixpkgs-staging to your inputs: nixpkgs-staging.url = "github:nixos/nixpkgs/staging";

And override libvterm-neovim for the actual neovim package

neovim-flake.packages.x86_64-linux.default.override {
  libvterm-neovim = nixpkgs-staging.legacyPackages.x86_64-linux.libvterm-neovim;
};
vinnymeller commented 11 months ago

it takes longer to rebuild but you can also just add to the input for the overlay:

neovim-nightly-overlay = {
  url = "github:nix-community/neovim-nightly-overlay";
  inputs.nixpkgs.follows = "nixpkgs-staging";
};

with nixpkgs-staging being the same as in the above comment

ryantm commented 11 months ago

Is it possible to change the automation to only update the flake if it builds successfully?

Kranzes commented 11 months ago

Is it possible to change the automation to only update the flake if it builds successfully?

Sure. Idk if I want it to be blocked if Darwin fails though, I have to look into that.

LSleutsky commented 11 months ago

it takes longer to rebuild but you can also just add to the input for the overlay:

neovim-nightly-overlay = {
  url = "github:nix-community/neovim-nightly-overlay";
  inputs.nixpkgs.follows = "nixpkgs-staging";
};

with nixpkgs-staging being the same as in the above comment

What do you mean by the last part

with `nixpkgs-staging` being the same as in the above comment

?

When I try to add the logic you mention in your post, I get errors that nixpkgs-staging doesn't exist. How exactly do you have to set the flake up to get this working with the temporary fix, cause I've tried everything and still cannot build.

Thanks!

vinnymeller commented 11 months ago

@LSleutsky add the line nixpkgs-staging.url = "github:nixos/nixpkgs/staging"; below here

nixpkgs-staging just being nixpkgs from the staging branch (which currently has the good dependency)

i would link my config but it seems i forgot to push the changes after getting it working 😄

LSleutsky commented 11 months ago

@LSleutsky add the line nixpkgs-staging.url = "github:nixos/nixpkgs/staging"; below here

nixpkgs-staging just being nixpkgs from the staging branch (which currently has the good dependency)

i would link my config but it seems i forgot to push the changes after getting it working 😄

Ahhhh gotcha, duh! Thanks for the reply, works like a charm now...!

Kranzes commented 11 months ago

Is it possible to change the automation to only update the flake if it builds successfully?

Sure. Idk if I want it to be blocked if Darwin fails though, I have to look into that.

I've made it so updates are now made in the flake-update branch and are turned into a PR that gets rebased & merged into master once neovim builds for Linux. This means that the master branch from now on should always have a working Linux package, Darwin on the other hand can still be blocker as I make its failure ignore-able in CI as Darwin tends to be much more fragile. If enough people want me to set Darwin as a blocker too, I can agree to do that, just remember that until recently Darwin was failing for multiple months while Linux was not. I am also applying the temp workaround for the current build failure.

Kranzes commented 11 months ago

I am keeping this issue open until this gets resolved in the next staging bump in nixpkgs

bayou-brogrammer commented 11 months ago

Another quick solution is to just use overlays:

_: _final: prev: {
  libvterm-neovim = prev.libvterm-neovim.overrideAttrs (_: rec {
    doCheck = false;
    version = "0.3.3";
    src = prev.fetchurl {
      url = "https://launchpad.net/libvterm/trunk/v${prev.lib.versions.majorMinor version}/+download/libvterm-${version}.tar.gz";
      hash = "sha256-CRVvQ90hKL00fL7r5Q2aVx0yxk4M8Y0hEZeUav9yJuA=";
    };
  });

  neovim-unwrapped = prev.neovim-unwrapped.override {
    inherit (prev.llvmPackages_latest) stdenv;
    inherit (final) libvterm-neovim;
  };
}

....
<inside nixVim setup>

config = { package = pkgs.neovim-unwrapped; }
Kranzes commented 11 months ago

These are all basically worse than what I pushed to master earlier.

Kranzes commented 10 months ago

solved.