nixpkgs/pkgs/development/tools/rtags/default.nix
John Ericson f79f80dbf2 treewide: get rid of platforms.allBut
Negative reasoning like `allBut` is a bad idea with an open world of
platforms. Concretely, if we add a new, quite different sort of
platform, existing packages with `allBut` will claim they work on it
even though they probably won't.
2018-03-14 18:44:42 -04:00

38 lines
1.3 KiB
Nix

{ stdenv, lib, fetchgit, cmake, llvmPackages, openssl, writeScript, apple_sdk, bash, emacs, pkgconfig }:
stdenv.mkDerivation rec {
name = "rtags-${version}";
version = "2.16";
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ llvmPackages.llvm openssl emacs ]
++ lib.optionals stdenv.cc.isGNU [ llvmPackages.clang-unwrapped ]
++ 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 = "15qmwkajw2zzfnw9hnv08p0asa6prg88nvqlxmv56c0dyhldjpkm";
# 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 = with stdenv.lib.platforms; x86_64 ++ aarch64;
};
}