summaryrefslogtreecommitdiff
path: root/gnu/packages/llvm.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-01-09 10:48:42 +0200
committerEfraim Flashner <efraim@flashner.co.il>2019-01-09 10:52:41 +0200
commit0e289672503a4e1599ef826d49f2fa5575081942 (patch)
treecdaec28207956090b7cebff805135754dcb22f06 /gnu/packages/llvm.scm
parent0109b89c5834b5374f248dc3681702180013f41f (diff)
parent6df4d8338d2bf94ab729e3b12e42ace0a06687ae (diff)
downloadpatches-0e289672503a4e1599ef826d49f2fa5575081942.tar
patches-0e289672503a4e1599ef826d49f2fa5575081942.tar.gz
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'gnu/packages/llvm.scm')
-rw-r--r--gnu/packages/llvm.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 2a3754b931..a435ab661e 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -459,6 +459,35 @@ code analysis tools.")
"This package provides a Python binding to LLVM for use in Numba.")
(license license:bsd-3)))
+(define (package-elisp-from-package source-package package-name
+ source-files)
+ "Return a package definition named PACKAGE-NAME that packages the Emacs Lisp
+SOURCE-FILES found in SOURCE-PACKAGE."
+ (let ((orig (package-source source-package)))
+ (package
+ (inherit source-package)
+ (name package-name)
+ (build-system emacs-build-system)
+ (source (origin
+ (method (origin-method orig))
+ (uri (origin-uri orig))
+ (sha256 (origin-sha256 orig))
+ (file-name (string-append package-name "-"
+ (package-version source-package)))
+ (modules '((guix build utils)
+ (srfi srfi-1)
+ (ice-9 ftw)))
+ (snippet
+ `(let* ((source-files (quote ,source-files))
+ (basenames (map basename source-files)))
+ (map copy-file
+ source-files basenames)
+ (map delete-file-recursively
+ (fold delete
+ (scandir ".")
+ (append '("." "..") basenames)))
+ #t)))))))
+
(define-public emacs-clang-format
(package
(inherit clang)