(guix)
(guix combinators)
(guix git-download)
+ (guix grafts)
(guix packages)
(guix profiles)
(guix licenses)
(new-manifest (manifest-perform-transaction
manifest transaction)))
(unless (and (null? install) (null? remove))
- (with-store store
- (set-build-options store
- #:print-build-trace #f
- #:use-substitutes? use-substitutes?)
- (show-manifest-transaction store manifest transaction
- #:dry-run? dry-run?)
- (build-and-use-profile store profile new-manifest
- #:use-substitutes? use-substitutes?
- #:dry-run? dry-run?)))))
+ (parameterize ((%graft? (not dry-run?)))
+ (with-store store
+ (set-build-options store
+ #:print-build-trace #f
+ #:use-substitutes? use-substitutes?)
+ (show-manifest-transaction store manifest transaction
+ #:dry-run? dry-run?)
+ (build-and-use-profile store profile new-manifest
+ #:use-substitutes? use-substitutes?
+ #:dry-run? dry-run?))))))
(define (delete-generations* profile generations)
"Delete GENERATIONS from PROFILE.
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Deck Pickard <deck.r.pickard@gmail.com>
-;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix scripts)
+ #:use-module (guix grafts)
#:use-module (guix utils)
#:use-module (guix ui)
#:use-module (guix store)
#:rest build-options)
"Build PACKAGE using BUILD-OPTIONS acceptable by 'set-build-options'.
Show what and how will/would be built."
- (mbegin %store-monad
+ (mlet %store-monad ((grafting? ((lift0 %graft? %store-monad))))
(apply set-build-options*
#:use-substitutes? use-substitutes?
(strip-keyword-arguments '(#:dry-run?) build-options))
- (mlet %store-monad ((derivation (package->derivation package)))
+ (mlet %store-monad ((derivation (package->derivation
+ package #:graft? (and (not dry-run?)
+ grafting?))))
(mbegin %store-monad
(maybe-build (list derivation)
#:use-substitutes? use-substitutes?