packages: Add 'set-grafting' procedure.

* guix/packages.scm (set-grafting): New procedure.
This commit is contained in:
Ludovic Courtès 2015-02-13 23:07:11 +01:00
parent 2bba832f88
commit b8bedf6051

View file

@ -114,6 +114,7 @@ (define-module (guix packages)
default-guile
set-guile-for-build
set-grafting
package-file
package->derivation
package->cross-derivation
@ -906,6 +907,12 @@ (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