guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: gnu: emacs-clang-format: Inherit from clang.


From: guix-commits
Subject: 01/03: gnu: emacs-clang-format: Inherit from clang.
Date: Mon, 26 Nov 2018 08:53:51 -0500 (EST)

ambrevar pushed a commit to branch master
in repository guix.

commit 7628ff1fc04e2a338660e9c40c094e914e0f4b62
Author: Tim Gesthuizen <address@hidden>
Date:   Mon Nov 12 22:27:41 2018 +0100

    gnu: emacs-clang-format: Inherit from clang.
    
    * gnu/packages/emacs.scm (emacs-clang-format): Remove.
    * gnu/packages/llvm.scm (emacs-clang-format): Add.
---
 gnu/packages/emacs.scm | 37 -------------------------------------
 gnu/packages/llvm.scm  | 27 +++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 37 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 9112902..e69121a 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -12533,43 +12533,6 @@ correctly.")
 @end itemize\n")
       (license license:gpl3+))))
 
-(define-public emacs-clang-format
-  (let ((commit "5556c31528af2661bed3011bd63ffc0ed44e18a0"))
-    (package
-      (name "emacs-clang-format")
-      (version (git-version "0.0.0" "1" commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/emacsorphanage/clang-format";)
-                      (commit commit)))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "0ynvnp3vrcpngmwakb23xv4xn7jbkg43s196q7pg9nkl13x4n2nq"))))
-      (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")))
-                 ;; Repo is read-only.
-                 (chmod "clang-format.el" #o644)
-                 (emacs-substitute-variables "clang-format.el"
-                   ("clang-format-executable"
-                    (string-append clang "/bin/clang-format"))))
-               #t)))))
-      (home-page "https://github.com/emacsorphanage/clang-format";)
-      (synopsis "Format code using clang-format")
-      (description "This package allows to filter code through clang-format to
-fix its formatting.  @command{clang-format} is a tool that formats C/C++/Obj-C
-code according to a set of style options, see
address@hidden://clang.llvm.org/docs/ClangFormatStyleOptions.html}.")
-      (license license:gpl3+))))
-
 (define-public emacs-gtk-look
   (package
     (name "emacs-gtk-look")
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index d237a05..6a452f4 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -7,6 +7,8 @@
 ;;; Copyright © 2017 Roel Janssen <address@hidden>
 ;;; Copyright © 2018 Marius Bakke <address@hidden>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <address@hidden>
+;;; Copyright © 2018 Tim Gesthuizen <address@hidden>
+;;; Copyright © 2018 Pierre Neidhardt <address@hidden>
 ;;;
 ;;; 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
address@hidden://clang.llvm.org/docs/ClangFormatStyleOptions.html}.")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]