diff options
Diffstat (limited to 'pkgs/misc/vim-plugins/default.nix')
-rw-r--r-- | pkgs/misc/vim-plugins/default.nix | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index 3ee8f32da0ce..fb60317172b4 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -3,6 +3,7 @@ , which, fetchgit, llvmPackages , xkb_switch, rustracerd, fzf , python3, boost, icu +, ycmd , Cocoa ? null }: @@ -1429,32 +1430,13 @@ rec { sha256 = "1bilzzv02ksqv6m44alp32s61scxqqj5cxx1klr70mhm81k2ksb9"; }; dependencies = []; - buildInputs = [ - python go cmake - ] ++ stdenv.lib.optional stdenv.isDarwin Cocoa; - - propagatedBuildInputs = stdenv.lib.optional (!stdenv.isDarwin) rustracerd; - - patches = [ - ./patches/youcompleteme/2-ycm-cmake.patch - ]; - - # YCM requires path to external libclang 3.9 - # For explicit use and as env variable for ../third_party/ycmd/build.py - EXTRA_CMAKE_ARGS="-DEXTERNAL_LIBCLANG_PATH=${llvmPackages.clang.cc}/lib/libclang.${if stdenv.isDarwin then "dylib" else "so"}"; - buildPhase = '' - patchShebangs . substituteInPlace plugin/youcompleteme.vim \ - --replace "'ycm_path_to_python_interpreter', '''" "'ycm_path_to_python_interpreter', '${python}/bin/python'" - - mkdir build - pushd build - cmake -G "Unix Makefiles" . ../third_party/ycmd/cpp -DPYTHON_LIBRARIES:PATH=${python}/lib/libpython2.7.so -DPYTHON_INCLUDE_DIR:PATH=${python}/include/python2.7 -DUSE_CLANG_COMPLETER=ON \ - $EXTRA_CMAKE_ARGS - make ycm_core -j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} - ${python}/bin/python ../third_party/ycmd/build.py --gocode-completer --clang-completer - popd + --replace "'ycm_path_to_python_interpreter', '''" \ + "'ycm_path_to_python_interpreter', '${python}/bin/python'" + + rm -r third_party/ycmd + ln -s ${ycmd}/lib/ycmd third_party ''; meta = { |