···3434 binutils_bin = if nativeTools then "" else getBin binutils;
3535 # The wrapper scripts use 'cat' and 'grep', so we may need coreutils.
3636 coreutils_bin = if nativeTools then "" else getBin coreutils;
3737+3838+ default_cxx_stdlib_compile=optionalString (stdenv.isLinux && !(cc.isGNU or false))
3939+ "-isystem $(echo -n ${cc.gcc}/include/c++/*) -isystem $(echo -n ${cc.gcc}/include/c++/*)/$(${cc.gcc}/bin/gcc -dumpmachine)";
3740in
38413942stdenv.mkDerivation {
···4649 inherit cc shell libc_bin libc_dev libc_lib binutils_bin coreutils_bin;
4750 gnugrep_bin = if nativeTools then "" else gnugrep;
48515252+4953 passthru = {
5050- inherit libc nativeTools nativeLibc nativePrefix isGNU isClang;
5454+ inherit libc nativeTools nativeLibc nativePrefix isGNU isClang default_cxx_stdlib_compile;
51555256 emacsBufferSetup = pkgs: ''
5357 ; We should handle propagation here too
···189193190194 export real_cc=cc
191195 export real_cxx=c++
192192- export default_cxx_stdlib_compile="${
193193- if stdenv.isLinux && !(cc.isGNU or false)
194194- then "-isystem $(echo -n ${cc.gcc}/include/c++/*) -isystem $(echo -n ${cc.gcc}/include/c++/*)/$(${cc.gcc}/bin/gcc -dumpmachine)"
195195- else ""
196196- }"
196196+ export default_cxx_stdlib_compile="${default_cxx_stdlib_compile}"
197197198198 if [ -e $ccPath/gcc ]; then
199199 wrap gcc ${./cc-wrapper.sh} $ccPath/gcc
+7
pkgs/misc/vim-plugins/default.nix
···293293 sha256 = "19zs03giv8h5xmv18y9zn85sxr8akphvbscclrqhs4cf88285cgl";
294294 };
295295 dependencies = [];
296296+ # In addition to the arguments you pass to your compiler, you also need to
297297+ # specify the path of the C++ std header (if you are using C++).
298298+ # These usually implicitly set by cc-wrapper around clang (pkgs/build-support/cc-wrapper).
299299+ # The linked ruby code shows generates the required '.clang_complete' for cmake based projects
300300+ # https://gist.github.com/Mic92/135e83803ed29162817fce4098dec144
301301+ # as an alternative you can execute the following command:
302302+ # $ eval echo $(nix-instantiate --eval --expr 'with (import <nixpkgs>) {}; clang.default_cxx_stdlib_compile')
296303 preFixup = ''
297304 substituteInPlace "$out"/share/vim-plugins/clang_complete/plugin/clang_complete.vim \
298305 --replace "let g:clang_library_path = '' + "''" + ''" "let g:clang_library_path='${llvmPackages.clang.cc}/lib/libclang.so'"
···11+ # In addition to the arguments you pass to your compiler, you also need to
22+ # specify the path of the C++ std header (if you are using C++).
33+ # These usually implicitly set by cc-wrapper around clang (pkgs/build-support/cc-wrapper).
44+ # The linked ruby code shows generates the required '.clang_complete' for cmake based projects
55+ # https://gist.github.com/Mic92/135e83803ed29162817fce4098dec144
66+ # as an alternative you can execute the following command:
77+ # $ eval echo $(nix-instantiate --eval --expr 'with (import <nixpkgs>) {}; clang.default_cxx_stdlib_compile')
18 preFixup = ''
29 substituteInPlace "$out"/share/vim-plugins/clang_complete/plugin/clang_complete.vim \
310 --replace "let g:clang_library_path = '' + "''" + ''" "let g:clang_library_path='${llvmPackages.clang.cc}/lib/libclang.so'"