aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2018-11-26 14:51:40 +0100
committerPierre Neidhardt <mail@ambrevar.xyz>2018-11-26 14:53:45 +0100
commit1c7372a5aadea84165376a4b8e2664b67a663c56 (patch)
treeb2c02321bb84e0680440b93c813eda40ff4c86b4 /gnu
parent51002b723dbd24805f5071c895b0c9cd6c7bf395 (diff)
downloadpatches-1c7372a5aadea84165376a4b8e2664b67a663c56.tar
patches-1c7372a5aadea84165376a4b8e2664b67a663c56.tar.gz
gnu: clang-from-llvm: Clean up share/clang folder.
* gnu/packages/llvm.scm (clang-from-llvm): Remove useless files, install completion.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/llvm.scm21
1 files changed, 20 insertions, 1 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 276a89c2a0..0b12f736a9 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -235,7 +235,26 @@ compiler. In LLVM this library is called \"compiler-rt\".")
(substitute* "lib/Driver/ToolChains.cpp"
(("@GLIBC_LIBDIR@")
(string-append libc "/lib")))))
- #t))))))
+ #t)))
+ (add-after 'install 'install-clean-up-/share/clang
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (compl-dir (string-append
+ out "/etc/bash_completion.d")))
+ (with-directory-excursion (string-append out
+ "/share/clang")
+ ;; Delete extensions for proprietary text editors.
+ (delete-file "clang-format-bbedit.applescript")
+ (delete-file "clang-format-sublime.py")
+ ;; Delete Emacs extensions: see their respective Emacs
+ ;; Guix package instead.
+ (delete-file "clang-rename.el")
+ (delete-file "clang-format.el")
+ ;; Install bash completion.
+ (mkdir-p compl-dir)
+ (rename-file "bash-autocomplete.sh"
+ (string-append compl-dir "/clang"))))
+ #t)))))
;; Clang supports the same environment variables as GCC.
(native-search-paths