neovim-qt: fix msgpack dependency, disable failing test, Darwin

This commit is contained in:
Andrew Childs 2018-08-20 00:40:50 +09:00
parent 8014c7f186
commit 3f0fa8fd77

View file

@ -13,8 +13,7 @@ stdenv.mkDerivation rec {
};
cmakeFlags = [
"-DMSGPACK_INCLUDE_DIRS=${msgpack}/include"
"-DMSGPACK_LIBRARIES=${msgpack}/lib/msgpackc.so"
"-DUSE_SYSTEM_MSGPACK=1"
];
buildInputs = with pythonPackages; [
@ -28,13 +27,12 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
preConfigure = ''
# avoid cmake trying to download msgpack
echo "" > third-party/CMakeLists.txt
# we rip out a number of tests that fail in the build env
# the GUI tests will never work but the others should - they did before neovim 0.2.0
# was released
sed -i test/CMakeLists.txt \
-e '/^add_xtest_gui/d' \
-e '/tst_neovimobject/d' \
-e '/tst_neovimconnector/d' \
-e '/tst_callallmethods/d' \
-e '/tst_encoding/d'
@ -42,7 +40,14 @@ stdenv.mkDerivation rec {
doCheck = true;
postInstall = ''
postInstall = if stdenv.isDarwin then ''
mkdir -p $out/Applications
mv $out/bin/nvim-qt.app $out/Applications
rmdir $out/bin || :
wrapProgram "$out/Applications/nvim-qt.app/Contents/MacOS/nvim-qt" \
--prefix PATH : "${neovim}/bin"
'' else ''
wrapProgram "$out/bin/nvim-qt" \
--prefix PATH : "${neovim}/bin"
'';