aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/llvm.scm
diff options
context:
space:
mode:
authorTim Gesthuizen <tim.gesthuizen@yahoo.de>2018-11-12 22:27:41 +0100
committerPierre Neidhardt <mail@ambrevar.xyz>2018-11-26 14:53:45 +0100
commit7628ff1fc04e2a338660e9c40c094e914e0f4b62 (patch)
tree6d23b68e22e807a9053835f412ee0abe0920e4ec /gnu/packages/llvm.scm
parent3133d678a8e13aee1c432272e6fd82bc57f6e95e (diff)
downloadgnu-guix-7628ff1fc04e2a338660e9c40c094e914e0f4b62.tar
gnu-guix-7628ff1fc04e2a338660e9c40c094e914e0f4b62.tar.gz
gnu: emacs-clang-format: Inherit from clang.
* gnu/packages/emacs.scm (emacs-clang-format): Remove. * gnu/packages/llvm.scm (emacs-clang-format): Add.
Diffstat (limited to 'gnu/packages/llvm.scm')
-rw-r--r--gnu/packages/llvm.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index d237a05a84..6a452f48c6 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -7,6 +7,8 @@
;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
+;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,6 +32,7 @@
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system emacs)
#:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages gcc)
@@ -433,3 +436,27 @@ code analysis tools.")
(description
"This package provides a Python binding to LLVM for use in Numba.")
(license license:bsd-3)))
+
+(define-public emacs-clang-format
+ (package
+ (inherit clang)
+ (name "emacs-clang-format")
+ (build-system emacs-build-system)
+ (inputs
+ `(("clang" ,clang)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((clang (assoc-ref inputs "clang")))
+ (copy-file "tools/clang-format/clang-format.el" "clang-format.el")
+ (emacs-substitute-variables "clang-format.el"
+ ("clang-format-executable"
+ (string-append clang "/bin/clang-format"))))
+ #t)))))
+ (synopsis "Format code using clang-format")
+ (description "This package allows to filter code through @code{clang-format}
+to fix its formatting. @code{clang-format} is a tool that formats
+C/C++/Obj-C code according to a set of style options, see
+@url{http://clang.llvm.org/docs/ClangFormatStyleOptions.html}.")))