ccls: fix libc++ header path

+8 -17
+3 -9
pkgs/development/tools/misc/ccls/default.nix
··· 21 cmakeFlagsArray+=(-DCMAKE_CXX_FLAGS="-fvisibility=hidden -fno-rtti") 22 ''; 23 24 shell = runtimeShell; 25 - postFixup = '' 26 - # We need to tell ccls where to find the standard library headers. 27 28 - standard_library_includes="\\\"-isystem\\\", \\\"${lib.getDev stdenv.cc.libc}/include\\\"" 29 - standard_library_includes+=", \\\"-isystem\\\", \\\"${llvmPackages.libcxx}/include/c++/v1\\\"" 30 - export standard_library_includes 31 - 32 - wrapped=".ccls-wrapped" 33 - export wrapped 34 - 35 mv $out/bin/ccls $out/bin/$wrapped 36 substituteAll ${./wrapper} $out/bin/ccls 37 chmod --reference=$out/bin/$wrapped $out/bin/ccls
··· 21 cmakeFlagsArray+=(-DCMAKE_CXX_FLAGS="-fvisibility=hidden -fno-rtti") 22 ''; 23 24 + clang = llvmPackages.clang; 25 shell = runtimeShell; 26 27 + postFixup = '' 28 + export wrapped=".ccls-wrapped" 29 mv $out/bin/ccls $out/bin/$wrapped 30 substituteAll ${./wrapper} $out/bin/ccls 31 chmod --reference=$out/bin/$wrapped $out/bin/ccls
+5 -8
pkgs/development/tools/misc/ccls/wrapper
··· 1 #! @shell@ -e 2 3 - initString="--init={\"clang\":{\"extraArgs\": [@standard_library_includes@" 4 - 5 - if [ "${NIX_CFLAGS_COMPILE}" != "" ]; then 6 - read -a cflags_array <<< ${NIX_CFLAGS_COMPILE} 7 - initString+=$(printf ', \"%s\"' "${cflags_array[@]}") 8 - fi 9 - 10 - initString+="]}}" 11 12 exec -a "$0" "@out@/bin/@wrapped@" "${initString}" "$@"
··· 1 #! @shell@ -e 2 3 + printf -v extraArgs ',\"%s\"' \ 4 + $(cat @clang@/nix-support/libc-cflags \ 5 + @clang@/nix-support/libcxx-cxxflags) \ 6 + ${NIX_CFLAGS_COMPILE} 7 + initString="--init={\"clang\":{\"extraArgs\":[${extraArgs:1}]}}" 8 9 exec -a "$0" "@out@/bin/@wrapped@" "${initString}" "$@"