about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/rtags/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/rtags/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/rtags/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/rtags/default.nix b/nixpkgs/pkgs/development/tools/rtags/default.nix
new file mode 100644
index 000000000000..0ebeab72df3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/rtags/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, fetchgit, cmake, llvmPackages, openssl, apple_sdk, emacs, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  pname = "rtags";
+  version = "2.38";
+  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 = "1iwvp7a69sj3wqjgcnyh581qrpicxzi2lfjkxqpabpyjkl5nk7hh";
+    # 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;
+  };
+}