Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 16.09 33 lines 1.4 kB view raw
1 buildInputs = [ 2 python go cmake 3 (if stdenv.isDarwin then llvmPackages.clang else llvmPackages.clang-unwrapped) 4 llvmPackages.llvm 5 ] ++ stdenv.lib.optional stdenv.isDarwin Cocoa; 6 7 propagatedBuildInputs = stdenv.lib.optional (!stdenv.isDarwin) rustracerd; 8 9 patches = [ 10 ./patches/youcompleteme/1-top-cmake.patch 11 ./patches/youcompleteme/2-ycm-cmake.patch 12 ]; 13 14 buildPhase = '' 15 patchShebangs . 16 substituteInPlace plugin/youcompleteme.vim \ 17 --replace "'ycm_path_to_python_interpreter', '''" "'ycm_path_to_python_interpreter', '${python}/bin/python'" 18 19 mkdir build 20 pushd build 21 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 -DUSE_SYSTEM_LIBCLANG=ON 22 make ycm_core -j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} 23 ${python}/bin/python ../third_party/ycmd/build.py --gocode-completer --clang-completer --system-libclang 24 popd 25 ''; 26 27 meta = { 28 description = "Fastest non utf-8 aware word and C completion engine for Vim"; 29 homepage = http://github.com/Valloric/YouCompleteMe; 30 license = stdenv.lib.licenses.gpl3; 31 maintainers = with stdenv.lib.maintainers; [marcweber jagajaga]; 32 platforms = stdenv.lib.platforms.unix; 33 };