From 8af5e2ef014d9391195faf2f060c2d28ea5d8bd3 Mon Sep 17 00:00:00 2001 From: Anders Papitto Date: Fri, 16 Oct 2015 20:54:15 -0700 Subject: [PATCH] rtags: init at 9fed420 --- pkgs/development/tools/rtags/default.nix | 37 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 8 +++-- pkgs/top-level/emacs-packages.nix | 9 ++++++ 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/tools/rtags/default.nix diff --git a/pkgs/development/tools/rtags/default.nix b/pkgs/development/tools/rtags/default.nix new file mode 100644 index 000000000000..208445c3ec5c --- /dev/null +++ b/pkgs/development/tools/rtags/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchgit, cmake, llvm, openssl, clang, writeScript, bash }: + +let llvm-config-wrapper = writeScript "llvm-config" '' + #! ${bash}/bin/bash + if [[ "$1" = "--cxxflags" ]]; then + echo $(${llvm}/bin/llvm-config "$@") -isystem ${clang.cc}/include + else + ${llvm}/bin/llvm-config "$@" + fi + ''; + +in stdenv.mkDerivation rec { + name = "rtags-${version}"; + rev = "9fed420d20935faf55770765591fc2de02eeee28"; + version = "${stdenv.lib.strings.substring 0 7 rev}"; + + buildInputs = [ cmake llvm openssl clang ]; + + preConfigure = '' + export LIBCLANG_LLVM_CONFIG_EXECUTABLE=${llvm-config-wrapper} + ''; + + src = fetchgit { + inherit rev; + fetchSubmodules = true; + url = "https://github.com/andersbakken/rtags.git"; + sha256 = "1sb6wfknhvrgirqp65paz7kihv4zgg8g5f7a7i14i10sysalxbif"; + }; + + meta = { + description = "C/C++ client-server indexer based on clang"; + + homepage = https://github.com/andersbakken/rtags; + + license = stdenv.lib.licenses.gpl3; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6564a15cad2f..c3790e05f727 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4693,6 +4693,8 @@ let ocaml = ocaml_3_08_0; }; + rtags = callPackage ../development/tools/rtags/default.nix {}; + rustcMaster = callPackage ../development/compilers/rustc/head.nix {}; rustc = callPackage ../development/compilers/rustc {}; @@ -10449,7 +10451,7 @@ let coreclr = callPackage ../development/compilers/coreclr { }; corefonts = callPackage ../data/fonts/corefonts { }; - + culmus = callPackage ../data/fonts/culmus { }; wrapFonts = paths : (callPackage ../data/fonts/fontWrap { inherit paths; }); @@ -11324,6 +11326,7 @@ let external = { inherit (haskellPackages) ghc-mod structured-haskell-mode Agda; inherit (pythonPackages) elpy; + inherit rtags; }; }; @@ -12388,7 +12391,7 @@ let pencil = callPackage ../applications/graphics/pencil { }; - perseus = callPackage ../applications/science/math/perseus {}; + perseus = callPackage ../applications/science/math/perseus {}; petrifoo = callPackage ../applications/audio/petrifoo { inherit (gnome) libgnomecanvas; @@ -15203,4 +15206,3 @@ tweakAlias = _n: alias: with lib; else alias; in lib.mapAttrs tweakAlias aliases // self; in pkgs - diff --git a/pkgs/top-level/emacs-packages.nix b/pkgs/top-level/emacs-packages.nix index d331850b504b..12f24f650c8e 100644 --- a/pkgs/top-level/emacs-packages.nix +++ b/pkgs/top-level/emacs-packages.nix @@ -694,6 +694,15 @@ let self = _self // overrides; meta = { license = bsd3; }; }; + rtags = melpaBuild rec { + pname = "rtags"; + version = "2.0"; # really, it's some arbitrary git hash + src = external.rtags.src; + propagatedUserEnvPkgs = [ external.rtags ]; + fileSpecs = [ "src/*.el" ]; + inherit (external.rtags) meta; + }; + git-auto-commit-mode = melpaBuild rec { pname = "git-auto-commit-mode"; version = "4.4.0";