guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: Fix top-level circular references between emacs.scm and llvm


From: guix-commits
Subject: 01/01: gnu: Fix top-level circular references between emacs.scm and llvm.scm.
Date: Mon, 7 Jan 2019 09:09:44 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 67eebb19b70acfe997b40d8c7978f9dc0673a4af
Author: Ludovic Courtès <address@hidden>
Date:   Mon Jan 7 14:59:01 2019 +0100

    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.
---
 gnu/packages/emacs.scm | 29 -----------------------------
 gnu/packages/llvm.scm  | 29 +++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 0c39a9c..33b011c 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -331,35 +331,6 @@ editor (without an X toolkit)" )
              (lambda _
                (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.
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 6dab9c5..b1e41d7 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -479,6 +479,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)



reply via email to

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