[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/22: grafts: Add 'without-grafting'.
From: |
guix-commits |
Subject: |
14/22: grafts: Add 'without-grafting'. |
Date: |
Tue, 30 Mar 2021 17:00:17 -0400 (EDT) |
civodul pushed a commit to branch core-updates
in repository guix.
commit 565733c4d71ebfa0f200d027de2ea663461c1bd3
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Mar 7 15:26:17 2021 +0100
grafts: Add 'without-grafting'.
* guix/grafts.scm (call-without-grafting): New procedure.
(without-grafting): New macro.
---
guix/grafts.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/guix/grafts.scm b/guix/grafts.scm
index fd8a108..7f5b97c 100644
--- a/guix/grafts.scm
+++ b/guix/grafts.scm
@@ -42,6 +42,7 @@
graft-derivation/shallow
%graft?
+ without-grafting
set-grafting
grafting?))
@@ -323,6 +324,17 @@ DRV, and graft DRV itself to refer to those grafted
dependencies."
;; Whether to honor package grafts by default.
(make-parameter #t))
+(define (call-without-grafting thunk)
+ (lambda (store)
+ (values (parameterize ((%graft? #f))
+ (run-with-store store (thunk)))
+ store)))
+
+(define-syntax-rule (without-grafting mexp ...)
+ "Bind monadic expressions MEXP in a dynamic extent where '%graft?' is
+false."
+ (call-without-grafting (lambda () (mbegin %store-monad mexp ...))))
+
(define-inlinable (set-grafting enable?)
;; This monadic procedure enables grafting when ENABLE? is true, and
;; disables it otherwise. It returns the previous setting.
- 11/22: packages: '%standard-patch-inputs' is not influenced by '%current-target-system'., (continued)
- 11/22: packages: '%standard-patch-inputs' is not influenced by '%current-target-system'., guix-commits, 2021/03/30
- 10/22: build-system: Use 'input-tuples->gexp' and 'outputs->gexp'., guix-commits, 2021/03/30
- 07/22: packages: Default origin 'patch-flags' is a gexp., guix-commits, 2021/03/30
- 12/22: packages: 'expand-input' accepts any file-like object., guix-commits, 2021/03/30
- 06/22: packages: Core procedures are written in monadic style., guix-commits, 2021/03/30
- 08/22: gexp: Add 'sexp->gexp'., guix-commits, 2021/03/30
- 18/22: gexp: 'imported+compiled-modules' fully honors #:guile., guix-commits, 2021/03/30
- 21/22: gnu: gnome-shell: Adjust to new #:disallowed-references convention., guix-commits, 2021/03/30
- 19/22: gexp: Add #:guile parameter to 'load-path-expression'., guix-commits, 2021/03/30
- 09/22: build-system: Use 'sexp->gexp' for plain sexps., guix-commits, 2021/03/30
- 14/22: grafts: Add 'without-grafting'.,
guix-commits <=
- 16/22: gexp: Do not add derivations to the object cache., guix-commits, 2021/03/30
- 22/22: gexp: 'compiled-modules' gets source and parameters an environment variables., guix-commits, 2021/03/30
- 20/22: gexp: 'gexp->script' uses #:guile also as the guile-for-build., guix-commits, 2021/03/30