From d2fe71b04d21d9f0374aa371e3229230e96dd97b Mon Sep 17 00:00:00 2001 From: Tim Gesthuizen Date: Thu, 30 Aug 2018 17:39:57 +0200 Subject: [PATCH] gnu: Add emacs-irony-mode. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/emacs.scm (emacs-irony-mode): New variable. (emacs-irony-mode-server): New variable. Co-authored-by: Ludovic Courtès --- gnu/packages/emacs.scm | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index bf163d8109..47c7685e9a 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -64,6 +64,7 @@ #:use-module (guix monads) #:use-module (guix store) #:use-module (guix build-system gnu) + #:use-module (guix build-system cmake) #:use-module (guix build-system emacs) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system trivial) @@ -85,6 +86,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages xorg) #:use-module (gnu packages lesstif) + #:use-module (gnu packages llvm) #:use-module (gnu packages image) #:use-module (gnu packages linux) #:use-module (gnu packages version-control) @@ -2730,6 +2732,49 @@ front-ends. Company comes with many back-ends, e.g. @code{company-elisp}. These are distributed in separate files and can be used individually.") (license license:gpl3+))) +(define-public emacs-irony-mode + (package + (name "emacs-irony-mode") + (version "1.2.0") + (home-page "https://github.com/Sarcasm/irony-mode") + (source (origin + (method url-fetch) + (uri (string-append home-page "/archive/v" version ".tar.gz")) + (sha256 + (base32 + "1f68zi0glkg2aly66s07rx3w0b0hdi1znxan02h6dbabaadylk99")) + (file-name (string-append name "-" version ".tar.gz")))) + (build-system emacs-build-system) + (arguments '()) + (propagated-inputs + `(("emacs-irony-mode-server" ,emacs-irony-mode-server))) + (synopsis "C/C++/ObjC Code completion and syntax checks for Emacs") + (description "Irony-mode provides Clang-assisted syntax checking and +completion for C, C++, and ObjC in GNU Emacs. Using @code{libclang} it can +provide syntax checking and autocompletion on compiler level which is very +resistent against false positives. It also integrates well with other +packages like @code{eldoc-mode} and especially @code{company-mode} as +described on the homepage.") + (license license:gpl3+))) + +(define-public emacs-irony-mode-server + (package (inherit emacs-irony-mode) + (name "emacs-irony-mode-server") + (inputs + `(("clang" ,clang))) + (propagated-inputs '()) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "cmake" + "server" + (string-append "-DCMAKE_INSTALL_PREFIX=" out)) #t)))))) + (build-system cmake-build-system) + (synopsis "Server for the Emacs @dfn{irony mode}"))) + (define-public emacs-company-quickhelp (package (name "emacs-company-quickhelp")