Merge pull request #26092 from LnL7/darwin-libclang

clang: fix libclang on darwin
This commit is contained in:
Daiderd Jordan 2017-05-28 20:36:29 +02:00 committed by GitHub
commit 6b91d0dc63
2 changed files with 5 additions and 8 deletions

View file

@ -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
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 ];
buildInputs = [ libedit libxml2 llvm ];
buildInputs = [ libedit libxml2 llvm ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11"

View file

@ -22,12 +22,6 @@ stdenv.mkDerivation rec {
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 = {
description = "C/C++ client-server indexer based on clang";
homepage = https://github.com/andersbakken/rtags;