Merge pull request #26092 from LnL7/darwin-libclang
clang: fix libclang on darwin
This commit is contained in:
commit
6b91d0dc63
@ -1,4 +1,6 @@
|
|||||||
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python }:
|
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python
|
||||||
|
, fixDarwinDylibNames
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||||
@ -14,7 +16,8 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python python.pkgs.sphinx ];
|
nativeBuildInputs = [ cmake python python.pkgs.sphinx ];
|
||||||
buildInputs = [ libedit libxml2 llvm ];
|
buildInputs = [ libedit libxml2 llvm ]
|
||||||
|
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||||
|
@ -22,12 +22,6 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
|
||||||
for f in $out/bin/{rc,rdm,rp}; do
|
|
||||||
install_name_tool -change @rpath/libclang.dylib ${llvmPackages.clang.cc}/lib/libclang.dylib ''${f}
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "C/C++ client-server indexer based on clang";
|
description = "C/C++ client-server indexer based on clang";
|
||||||
homepage = https://github.com/andersbakken/rtags;
|
homepage = https://github.com/andersbakken/rtags;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user