NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.59k stars 13.07k forks source link

Missing LibLUV dependency for most recent neovim versions #64400

Closed rvolosatovs closed 4 years ago

rvolosatovs commented 5 years ago

Issue description

Since https://github.com/neovim/neovim/pull/10123 neovim requires libluv for builds. See https://github.com/neovim/neovim/wiki/Following-HEAD#20190610

There's no released version yet containing this change, but it's nice to prepare for this already in order to simplify the update later.

The build on https://github.com/rvolosatovs/nixpkgs/commit/2b7a3bb484b9312ab500f106e50d3250f6866be7 fails for me with:

CMake Error at /nix/store/06zj4w9fdhwfpz9grbm01fqwgsl1ig4g-cmake-3.13.4/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LibLUV (missing: LIBLUV_LIBRARY LIBLUV_INCLUDE_DIR)
  (Required is at least version "1.30.0")
Call Stack (most recent call first):
  /nix/store/06zj4w9fdhwfpz9grbm01fqwgsl1ig4g-cmake-3.13.4/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindLibLUV.cmake:34 (find_package_handle_standard_args)
  CMakeLists.txt:386 (find_package)

I have no experience with either CMake or Lua, so it's quite hard for me to reason about this and debug, but as far as I understand the issue is that build requires luv.h(https://github.com/luvit/luv/blob/1.30.0-0/src/luv.h ???) to be present at build time and luaPackages.luv does not contain it:

tree $(nix eval --raw nixpkgs.luaPackages.luv)
/nix/store/gkszplgfs3z05765pbqqq9ahhsv1j8wv-lua5.2-luv-1.29.1-2
├── lib
│   └── lua
│       └── 5.2
│           └── luv.so
├── luv-1.29.1-2-rocks
│   ├── luv
│   │   └── 1.29.1-2
│   │       ├── doc
│   │       │   ├── docs.md
│   │       │   ├── LICENSE.txt
│   │       │   └── README.md
│   │       ├── luv-1.29.1-2.rockspec
│   │       └── rock_manifest
│   └── manifest
└── nix-support
    └── propagated-build-inputs

Refs https://github.com/neovim/neovim/issues/10181 https://github.com/neovim/neovim/pull/10359#issuecomment-506741724

cc @manveru

NilsIrl commented 4 years ago

cp: cannot stat '/nix/store/bf7vv7axnj3ispv4ac6xaf427zncrj3n-luajit-2.1.0-beta3-luv-1.30.0-0/luv-1.30.0-0-rocks/luv/1.30.0-0/lib/libluv.1.dylib': No such file or directory

seems related to me. Actually wrong issue. Take a look at #81206

vcunat commented 4 years ago

Except for darwin there's now a different (yet similar) error after solving that one; see https://hydra.nixos.org/job/nixpkgs/trunk/neovim-unwrapped.x86_64-darwin