summary refs log tree commit diff
path: root/gnu/packages/llvm.scm
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2019-01-07 14:58:40 +0100
committerPierre Neidhardt <mail@ambrevar.xyz>2019-01-07 14:58:40 +0100
commit3a3d4d9d545028cda846ae827a60249f7162d34e (patch)
tree38e57a8eefbfba44c4f07babfd5d0d1a6b1e14a8 /gnu/packages/llvm.scm
parent6fd2ed23acdf6cb87bb701e4f8f121afcf3cb9f2 (diff)
downloadguix-3a3d4d9d545028cda846ae827a60249f7162d34e.tar.gz
Revert "gnu: Use package-elisp-from-package for clangs emacs lisp files"
This reverts commit 5bc2e14add6433adbade3ccdf28c60e57334c20a.
Diffstat (limited to 'gnu/packages/llvm.scm')
-rw-r--r--gnu/packages/llvm.scm65
1 files changed, 33 insertions, 32 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 32d7ef81b1..6dab9c5195 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -8,7 +8,7 @@
 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018, 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
+;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -39,7 +39,6 @@
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages bootstrap)           ;glibc-dynamic-linker
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages emacs)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
@@ -482,21 +481,22 @@ code analysis tools.")
 
 (define-public emacs-clang-format
   (package
-    (inherit (package-elisp-from-package
-              clang
-              "emacs-clang-format"
-              '("tools/clang-format/clang-format.el")))
-    (inputs `(("clang" ,clang)))
-    (arguments `(#:phases
-                 (modify-phases %standard-phases
-                                (add-after 'unpack 'configure
-                                  (lambda* (#:key inputs #:allow-other-keys)
-                                    (chmod "clang-format.el" #o644)
-                                    (emacs-substitute-variables "clang-format.el"
-                                      ("clang-format-executable"
-                                       (string-append (assoc-ref inputs "clang")
-                                                      "/bin/clang-format")))
-                                    #t)))))
+    (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
@@ -505,21 +505,22 @@ C/C++/Obj-C code according to a set of style options, see
 
 (define-public emacs-clang-rename
   (package
-    (inherit (package-elisp-from-package
-              clang
-              "emacs-clang-rename"
-              '("tools/clang-rename/clang-rename.el")))
-    (inputs `(("clang" ,clang)))
-    (arguments `(#:phases
-                 (modify-phases %standard-phases
-                   (add-after 'unpack 'configure
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (chmod "clang-rename.el" #o644)
-                       (emacs-substitute-variables "clang-rename.el"
-                         ("clang-rename-binary"
-                          (string-append (assoc-ref inputs "clang")
-                                         "/bin/clang-rename")))
-                       #t)))))
+    (inherit clang)
+    (name "emacs-clang-rename")
+    (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-rename/clang-rename.el" "clang-rename.el")
+               (emacs-substitute-variables "clang-rename.el"
+                 ("clang-rename-binary"
+                  (string-append clang "/bin/clang-rename"))))
+             #t)))))
     (synopsis "Rename every occurrence of a symbol using clang-rename")
     (description "This package renames every occurrence of a symbol at point
 using @code{clang-rename}.")))