ccls: fix libc++ header path

(cherry picked from commit eef236e8efdf99e4e4d61815aa9889e5b64e6bc3)
This commit is contained in:
Gabriel Ebner
2021-05-24 17:44:27 +02:00
parent 0ae5309111
commit baedf2c785
2 changed files with 8 additions and 17 deletions
+3 -9
View File
@@ -21,17 +21,11 @@ stdenv.mkDerivation rec {
cmakeFlagsArray+=(-DCMAKE_CXX_FLAGS="-fvisibility=hidden -fno-rtti")
'';
clang = llvmPackages.clang;
shell = runtimeShell;
postFixup = ''
# We need to tell ccls where to find the standard library headers.
standard_library_includes="\\\"-isystem\\\", \\\"${lib.getDev stdenv.cc.libc}/include\\\""
standard_library_includes+=", \\\"-isystem\\\", \\\"${llvmPackages.libcxx}/include/c++/v1\\\""
export standard_library_includes
wrapped=".ccls-wrapped"
export wrapped
export wrapped=".ccls-wrapped"
mv $out/bin/ccls $out/bin/$wrapped
substituteAll ${./wrapper} $out/bin/ccls
chmod --reference=$out/bin/$wrapped $out/bin/ccls