Merge pull request #24417 from edanaher/fix-vim-youcompleteme

Fix vim youcompleteme
This commit is contained in:
Daiderd Jordan 2017-03-29 20:35:51 +02:00 committed by GitHub
commit f51ce6f929
5 changed files with 24 additions and 45 deletions

View File

@ -1,37 +0,0 @@
diff --git a/cpp/ycm/CMakeLists.txt b/cpp/ycm/CMakeLists.txt
index 2074c58e..9ecd6e57 100644
--- a/cpp/ycm/CMakeLists.txt
+++ b/cpp/ycm/CMakeLists.txt
@@ -335,7 +335,7 @@
COMMAND ${CMAKE_COMMAND} -E copy "${LIBCLANG_TARGET}" "$<TARGET_FILE_DIR:${PROJECT_NAME}>"
)
- if( APPLE )
+ #if( APPLE )
# In OS X El Capitan, Apple introduced System Integrity Protection.
# Amongst other things, this introduces features to the dynamic loader
# (dyld) which cause it to "sanitise" (and complain about) embedded
@@ -354,15 +354,15 @@
# simply strip the rpath entry from the dylib. There's no way any
# @executable_path that python might have could be in any way useful to
# libclang.dylib, so this seems perfectly safe.
- get_filename_component( LIBCLANG_TAIL ${LIBCLANG_TARGET} NAME )
- add_custom_command( TARGET ${PROJECT_NAME}
- POST_BUILD
- COMMAND install_name_tool
- "-delete_rpath"
- "@executable_path/../lib"
- "$<TARGET_FILE_DIR:${PROJECT_NAME}>/${LIBCLANG_TAIL}"
- )
- endif()
+ # get_filename_component( LIBCLANG_TAIL ${LIBCLANG_TARGET} NAME )
+ #add_custom_command( TARGET ${PROJECT_NAME}
+ # POST_BUILD
+ # COMMAND install_name_tool
+ # "-delete_rpath"
+ # "@executable_path/../lib"
+ # "$<TARGET_FILE_DIR:${PROJECT_NAME}>/${LIBCLANG_TAIL}"
+ # )
+ # endif()
endif()
endif()

View File

@ -7,12 +7,12 @@
stdenv.mkDerivation rec {
name = "ycmd-${version}";
version = "2017-02-03";
version = "2017-03-27";
src = fetchgit {
url = "git://github.com/Valloric/ycmd.git";
rev = "ec7a154f8fe50c071ecd0ac6841de8a50ce92f5d";
sha256 = "0rzxgqqqmmrv9r4k2ji074iprhw6sb0jkvh84wvi45yfyphsh0xi";
rev = "2ef1ae0d00a06a47fed3aacfd465a310e8bdb0d2";
sha256 = "0p5knlxgy66zi229ns1lfdhz5lram93vahmmk54w98fr3h8b1yfj";
};
buildInputs = [ cmake boost ] ++ stdenv.lib.optional stdenv.isDarwin Cocoa;
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
${python.interpreter} build.py --clang-completer --system-boost
'';
patches = [ ./2-ycm-cmake.patch ];
patches = [ ./dont-symlink-clang.patch ];
configurePhase = ":";

View File

@ -0,0 +1,16 @@
diff --git a/cpp/ycm/CMakeLists.txt b/cpp/ycm/CMakeLists.txt
index 00e4882..8f29797 100644
--- a/cpp/ycm/CMakeLists.txt
+++ b/cpp/ycm/CMakeLists.txt
@@ -310,11 +310,6 @@ if ( EXTERNAL_LIBCLANG_PATH OR USE_SYSTEM_LIBCLANG )
# our libraries require, in particular the Python one (from pyenv for
# instance).
set( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
- # When loading our library, the dynamic linker will look for
- # libclang.so.4, not libclang.so.4.x.
- file( RENAME
- ${EXTERNAL_LIBCLANG_PATH}.${CLANG_MAJOR_VERSION}.${CLANG_MINOR_VERSION}
- ${EXTERNAL_LIBCLANG_PATH}.${CLANG_MAJOR_VERSION} )
endif()
endif()

View File

@ -1528,11 +1528,11 @@ rec {
};
youcompleteme = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "youcompleteme-2017-02-27";
name = "youcompleteme-2017-03-28";
src = fetchgit {
url = "https://github.com/valloric/youcompleteme";
rev = "39659caf34c664c7419cadb41cb813158e0749fa";
sha256 = "0rl8fxcwcj61bj8b2qcnwfipcnf1nb47bvb52sv68sf9v78qa7sx";
rev = "03ba8a80cd04e2e051bb85eacaea802ca3c4d025";
sha256 = "1f44bxl4phk79p4n19p0qx5506hkhms77zi4x0sh0gh389xwxmv5";
};
dependencies = [];
buildPhase = ''

View File

@ -6987,7 +6987,7 @@ with pkgs;
ycmd = callPackage ../development/tools/misc/ycmd {
inherit (darwin.apple_sdk.frameworks) Cocoa;
llvmPackages = llvmPackages_39;
llvmPackages = llvmPackages_4;
python = python2;
};