Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neovim darwin fixes #16159

Merged
merged 3 commits into from
Jun 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions pkgs/applications/editors/neovim/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ 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

, withPython ? true, pythonPackages, extraPythonPackages ? []
Expand Down Expand Up @@ -75,20 +75,14 @@ let
glib
libtermkey
libuv
# For some reason, `luajit` has to be listed after `lua`. See
# https://github.com/NixOS/nixpkgs/issues/14442
lua
luajit
libmsgpack
ncurses
neovimLibvterm
unibilium

luaPackages.lpeg
luaPackages.mpack
luaPackages.luabitop

] ++ optional withJemalloc jemalloc;
luajit
luaPackages.lua
] ++ optional withJemalloc jemalloc
++ lualibs;

nativeBuildInputs = [
cmake
Expand All @@ -97,11 +91,13 @@ let
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);

lualibs = [ luaPackages.mpack luaPackages.lpeg luaPackages.luabitop ];

configureFlags = [
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
"-DENABLE_JEMALLOC=ON"
cmakeFlags = [
"-DLUA_PRG=${luaPackages.lua}/bin/lua"
];

preConfigure = ''
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/libraries/libmpack/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ stdenv.mkDerivation rec {
inherit rev;
sha256 = "1h3pbmykm69gfyi0wz647gz5836a6f3jc4azzll7i3mkpc11gcrd";
};
LIBTOOL = "libtool";
buildInputs = [ libtool ];
installPhase = ''
mkdir -p $out/lib/libmpack
Expand Down
6 changes: 6 additions & 0 deletions pkgs/top-level/lua-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ let
inherit lua;
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
buildLuaPackage = callPackage ../development/lua-modules/generic lua;

Expand Down Expand Up @@ -398,6 +403,7 @@ let
preInstall = ''
mkdir -p $out/lib/lua/${lua.luaversion}
'';
NIX_CFLAGS_COMPILE = "-Wno-error -fpic";
installFlags = [
"USE_SYSTEM_LUA=yes"
"LUA_VERSION_MAJ_MIN="
Expand Down