Skip to content
Snippets Groups Projects
Commit 9d8100f4 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

packages: Move grafting parameter to (guix derivations).

* guix/packages.scm (%graft?, set-grafting): Move to...
* guix/derivations.scm: ... here.
parent bcb13287
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,9 @@ (define-module (guix derivations)
build-derivations
built-derivations
%graft?
set-grafting
build-expression->derivation)
;; Re-export it from here for backward compatibility.
......@@ -1287,3 +1290,16 @@ (define %build-inputs
(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)))
......@@ -103,7 +103,6 @@ (define-module (guix packages)
&package-cross-build-system-error
package-cross-build-system-error?
%graft?
package->bag
bag->derivation
bag-transitive-inputs
......@@ -112,9 +111,7 @@ (define-module (guix packages)
bag-transitive-target-inputs
default-guile
set-guile-for-build
set-grafting
package-file
package->derivation
package->cross-derivation
......@@ -678,10 +675,6 @@ (define derivation
(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 @@ (define (set-guile-for-build guile)
(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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment