nixpkgs/pkgs/development/tools/rtags/default.nix
Balletie 311a1ee33a
rtags: Fix configure phase errors
Add pkgconfig as buildinput, so that the install path is correctly set
with cmake. PkgConfig is an optional dependency for rtags, but they
say it's necessary if you want to replace the prefix with
CMAKE_INSTALL_PREFIX. See:
caad9ac494/cmake/BashCompletion.cmake (L13)

Furthermore, I let the configurePhase of the rtags emacs package be a
noop.
2017-09-01 16:41:49 +02:00

37 lines
1.2 KiB
Nix

{ stdenv, lib, fetchgit, cmake, llvmPackages, openssl, writeScript, apple_sdk, bash, emacs, pkgconfig }:
stdenv.mkDerivation rec {
name = "rtags-${version}";
version = "2.12";
buildInputs = [ cmake llvmPackages.llvm openssl llvmPackages.clang emacs pkgconfig ]
++ lib.optionals stdenv.isDarwin [ apple_sdk.libs.xpc apple_sdk.frameworks.CoreServices ];
src = fetchgit {
rev = "refs/tags/v${version}";
fetchSubmodules = true;
url = "https://github.com/andersbakken/rtags.git";
sha256 = "0bgjcvyvkpqcgw4571iz39sqydmcaz6ymx7kxcmq6j7rffs6qs7l";
# unicode file names lead to different checksums on HFS+ vs. other
# filesystems because of unicode normalisation
postFetch = ''
rm $out/src/rct/tests/testfile_*.txt
'';
};
preConfigure = ''
export LIBCLANG_CXXFLAGS="-isystem ${llvmPackages.clang.cc}/include $(llvm-config --cxxflags) -fexceptions" \
LIBCLANG_LIBDIR="${llvmPackages.clang.cc}/lib"
'';
enableParallelBuilding = true;
meta = {
description = "C/C++ client-server indexer based on clang";
homepage = https://github.com/andersbakken/rtags;
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.allBut [ "i686-linux" ];
};
}