From c7f36cb5f0ddc86d50774ba7181064372e417f85 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 10 Jun 2015 10:05:59 +0200 Subject: [PATCH] fix neovim on darwin --- pkgs/applications/editors/neovim/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/neovim/default.nix b/pkgs/applications/editors/neovim/default.nix index 599b04e1028..3943a9910a4 100644 --- a/pkgs/applications/editors/neovim/default.nix +++ b/pkgs/applications/editors/neovim/default.nix @@ -29,7 +29,8 @@ let buildInputs = [ libtool perl ]; - makeFlags = "PREFIX=$(out)"; + makeFlags = [ "PREFIX=$(out)" ] + ++ stdenv.lib.optional stdenv.isDarwin "LIBTOOL=${libtool}/bin/libtool"; enableParallelBuilding = true; @@ -89,7 +90,16 @@ let LUA_CPATH="${lpeg}/lib/lua/${lua.luaversion}/?.so;${luabitop}/lib/lua/5.2/?.so"; LUA_PATH="${luaMessagePack}/share/lua/5.1/?.lua"; - postInstall = optionalString withPython '' + preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' + export DYLD_LIBRARY_PATH=${jemalloc}/lib + ''; + + postInstall = stdenv.lib.optionalString stdenv.isDarwin '' + echo patching $out/bin/nvim + install_name_tool -change libjemalloc.1.dylib \ + ${jemalloc}/lib/libjemalloc.1.dylib \ + $out/bin/nvim + '' + optionalString withPython '' ln -s ${pythonEnv}/bin/python $out/bin/nvim-python '' + optionalString withPython3 '' ln -s ${python3Env}/bin/python $out/bin/nvim-python3