Merge pull request #16159 from matthewbauer/neovim-darwin-fixes

Neovim darwin fixes
This commit is contained in:
Moritz Ulrich 2016-06-13 10:42:20 +02:00 committed by GitHub
commit edca4a1b55
3 changed files with 18 additions and 15 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, gettext, glib, libmsgpack, libtermkey { stdenv, fetchFromGitHub, cmake, gettext, glib, libmsgpack, libtermkey
, libtool, libuv, lua, luajit, luaPackages, man, ncurses, perl, pkgconfig , libtool, libuv, luajit, luaPackages, man, ncurses, perl, pkgconfig
, unibilium, makeWrapper, vimUtils, xsel , unibilium, makeWrapper, vimUtils, xsel
, withPython ? true, pythonPackages, extraPythonPackages ? [] , withPython ? true, pythonPackages, extraPythonPackages ? []
@ -75,20 +75,14 @@ let
glib glib
libtermkey libtermkey
libuv libuv
# For some reason, `luajit` has to be listed after `lua`. See
# https://github.com/NixOS/nixpkgs/issues/14442
lua
luajit
libmsgpack libmsgpack
ncurses ncurses
neovimLibvterm neovimLibvterm
unibilium unibilium
luajit
luaPackages.lpeg luaPackages.lua
luaPackages.mpack ] ++ optional withJemalloc jemalloc
luaPackages.luabitop ++ lualibs;
] ++ optional withJemalloc jemalloc;
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
@ -97,11 +91,13 @@ let
pkgconfig pkgconfig
]; ];
LUA_CPATH = "${luaPackages.lpeg}/lib/lua/${lua.luaversion}/?.so;${luaPackages.mpack}/lib/lua/${lua.luaversion}/?.so;${luaPackages.luabitop}/lib/lua/${lua.luaversion}/?.so"; LUA_PATH = stdenv.lib.concatStringsSep ";" (map luaPackages.getLuaPath lualibs);
LUA_CPATH = stdenv.lib.concatStringsSep ";" (map luaPackages.getLuaCPath lualibs);
configureFlags = [ lualibs = [ luaPackages.mpack luaPackages.lpeg luaPackages.luabitop ];
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
"-DENABLE_JEMALLOC=ON" cmakeFlags = [
"-DLUA_PRG=${luaPackages.lua}/bin/lua"
]; ];
preConfigure = '' preConfigure = ''

View File

@ -10,6 +10,7 @@ stdenv.mkDerivation rec {
inherit rev; inherit rev;
sha256 = "1h3pbmykm69gfyi0wz647gz5836a6f3jc4azzll7i3mkpc11gcrd"; sha256 = "1h3pbmykm69gfyi0wz647gz5836a6f3jc4azzll7i3mkpc11gcrd";
}; };
LIBTOOL = "libtool";
buildInputs = [ libtool ]; buildInputs = [ libtool ];
installPhase = '' installPhase = ''
mkdir -p $out/lib/libmpack mkdir -p $out/lib/libmpack

View File

@ -19,6 +19,11 @@ let
inherit lua; inherit lua;
inherit (stdenv.lib) maintainers; inherit (stdenv.lib) maintainers;
# helper functions for dealing with LUA_PATH and LUA_CPATH
getPath = lib : type : "${lib}/lib/lua/${lua.luaversion}/?.${type};${lib}/share/lua/${lua.luaversion}/?.${type}";
getLuaPath = lib : getPath lib "lua";
getLuaCPath = lib : getPath lib "so";
#define build lua package function #define build lua package function
buildLuaPackage = callPackage ../development/lua-modules/generic lua; buildLuaPackage = callPackage ../development/lua-modules/generic lua;
@ -398,6 +403,7 @@ let
preInstall = '' preInstall = ''
mkdir -p $out/lib/lua/${lua.luaversion} mkdir -p $out/lib/lua/${lua.luaversion}
''; '';
NIX_CFLAGS_COMPILE = "-Wno-error -fpic";
installFlags = [ installFlags = [
"USE_SYSTEM_LUA=yes" "USE_SYSTEM_LUA=yes"
"LUA_VERSION_MAJ_MIN=" "LUA_VERSION_MAJ_MIN="