guix-commits
[Top][All Lists]
Advanced

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

08/10: packages: Move grafting parameter to (guix derivations).


From: Ludovic Courtès
Subject: 08/10: packages: Move grafting parameter to (guix derivations).
Date: Tue, 17 Mar 2015 21:29:00 +0000

civodul pushed a commit to branch master
in repository guix.

commit 9d8100f4c7d9f44a3623419039ac985be7ba9bb3
Author: Ludovic Courtès <address@hidden>
Date:   Tue Mar 17 21:46:00 2015 +0100

    packages: Move grafting parameter to (guix derivations).
    
    * guix/packages.scm (%graft?, set-grafting): Move to...
    * guix/derivations.scm: ... here.
---
 guix/derivations.scm |   16 ++++++++++++++++
 guix/packages.scm    |   13 -------------
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/guix/derivations.scm b/guix/derivations.scm
index e592236..4b0048b 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -97,6 +97,9 @@
             build-derivations
             built-derivations
 
+            %graft?
+            set-grafting
+
             build-expression->derivation)
 
   ;; Re-export it from here for backward compatibility.
@@ -1287,3 +1290,16 @@ ALLOWED-REFERENCES, and LOCAL-BUILD?."
 
 (define built-derivations
   (store-lift build-derivations))
+
+;; The following might feel more at home in (guix packages) but since (guix
+;; gexp), which is a lower level, needs them, we put them here.
+
+(define %graft?
+  ;; Whether to honor package grafts by default.
+  (make-parameter #t))
+
+(define (set-grafting enable?)
+  "This monadic procedure enables grafting when ENABLE? is true, and disables
+it otherwise.  It returns the previous setting."
+  (lambda (store)
+    (values (%graft? enable?) store)))
diff --git a/guix/packages.scm b/guix/packages.scm
index fc52646..df56286 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -103,7 +103,6 @@
             &package-cross-build-system-error
             package-cross-build-system-error?
 
-            %graft?
             package->bag
             bag->derivation
             bag-transitive-inputs
@@ -112,9 +111,7 @@
             bag-transitive-target-inputs
 
             default-guile
-
             set-guile-for-build
-            set-grafting
             package-file
             package->derivation
             package->cross-derivation
@@ -678,10 +675,6 @@ information in exceptions."
                         (package package)
                         (input   x)))))))
 
-(define %graft?
-  ;; Whether to honor package grafts by default.
-  (make-parameter #t))
-
 (define* (package->bag package #:optional
                        (system (%current-system))
                        (target (%current-target-system))
@@ -918,12 +911,6 @@ code of derivations to GUILE, a package object."
     (let ((guile (package-derivation store guile)))
       (values (%guile-for-build guile) store))))
 
-(define (set-grafting enable?)
-  "This monadic procedure enables grafting when ENABLE? is true, and disables
-it otherwise.  It returns the previous setting."
-  (lambda (store)
-    (values (%graft? enable?) store)))
-
 (define* (package-file package
                        #:optional file
                        #:key



reply via email to

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