mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-24 19:49:25 -05:00
gnu: Fix top-level circular references between emacs.scm and llvm.scm.
Previously, loading either of these two modules could fail somewhat non-deterministically because each top-level was referencing a variable defined by the other module's top-level. * gnu/packages/emacs.scm (package-elisp-from-package): Move to... * gnu/packages/llvm.scm (package-elisp-from-package): Here. Keep private.
This commit is contained in:
parent
37e461e6f4
commit
67eebb19b7
2 changed files with 29 additions and 29 deletions
|
@ -331,35 +331,6 @@ (define-public guile-emacs
|
||||||
(lambda _
|
(lambda _
|
||||||
(invoke "mkdir" "-p" "src/deps")))))))))
|
(invoke "mkdir" "-p" "src/deps")))))))))
|
||||||
|
|
||||||
(define-public (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)))))))
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Emacs hacking.
|
;;; Emacs hacking.
|
||||||
|
|
|
@ -479,6 +479,35 @@ (define-public python-llvmlite
|
||||||
"This package provides a Python binding to LLVM for use in Numba.")
|
"This package provides a Python binding to LLVM for use in Numba.")
|
||||||
(license license:bsd-3)))
|
(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
|
(define-public emacs-clang-format
|
||||||
(package
|
(package
|
||||||
(inherit clang)
|
(inherit clang)
|
||||||
|
|
Loading…
Reference in a new issue