diff options
author | Michael Livshin <repo@cmm.kakpryg.net> | 2021-06-13 16:07:49 +0300 |
---|---|---|
committer | Michael Livshin <repo@cmm.kakpryg.net> | 2021-06-13 17:31:16 +0300 |
commit | 8e06a39574aeb6500ad233e3b529e0e43fb80788 (patch) | |
tree | 1ca587ddd649d902af47ad05633dd9ed920ed82a /pkgs/development/tools/clang-tools | |
parent | fa0326ce5233f7d592271df52c9d0812bec47b84 (diff) | |
download | nixpkgs-8e06a39574aeb6500ad233e3b529e0e43fb80788.tar nixpkgs-8e06a39574aeb6500ad233e3b529e0e43fb80788.tar.gz nixpkgs-8e06a39574aeb6500ad233e3b529e0e43fb80788.tar.bz2 nixpkgs-8e06a39574aeb6500ad233e3b529e0e43fb80788.tar.lz nixpkgs-8e06a39574aeb6500ad233e3b529e0e43fb80788.tar.xz nixpkgs-8e06a39574aeb6500ad233e3b529e0e43fb80788.tar.zst nixpkgs-8e06a39574aeb6500ad233e3b529e0e43fb80788.zip |
clang-tools: fix clangd
Whatever change has necessitated https://github.com/NixOS/nixpkgs/pull/122044, it also broke clangd -- <clang-wrapper>/resource-root/include is no longer automagically searched for includes, which kills pretty much any indexing since that directory contains vital stuff like stddef.h etc. Fix by appending the directory to CPATH & CPLUS_INCLUDE_PATH in the clangd wrapper.
Diffstat (limited to 'pkgs/development/tools/clang-tools')
-rwxr-xr-x | pkgs/development/tools/clang-tools/wrapper | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/tools/clang-tools/wrapper b/pkgs/development/tools/clang-tools/wrapper index eebc152d11b..1008023fdc0 100755 --- a/pkgs/development/tools/clang-tools/wrapper +++ b/pkgs/development/tools/clang-tools/wrapper @@ -19,9 +19,9 @@ buildcpath() { } export CPATH=${CPATH}${CPATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \ - $(<@clang@/nix-support/libc-cflags)) + $(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \ $(<@clang@/nix-support/libcxx-cxxflags) \ - $(<@clang@/nix-support/libc-cflags)) + $(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include exec -a "$0" @unwrapped@/bin/$(basename $0) "$@" |