[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/22: packages: Default origin 'patch-flags' is a gexp.
From: |
guix-commits |
Subject: |
07/22: packages: Default origin 'patch-flags' is a gexp. |
Date: |
Tue, 30 Mar 2021 17:00:14 -0400 (EDT) |
civodul pushed a commit to branch core-updates
in repository guix.
commit 4f5f1d98efe4343cd301d684094a00b82e069f1d
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Feb 28 20:53:00 2021 +0100
packages: Default origin 'patch-flags' is a gexp.
Using a gexp instead of a list means that 'gexp->sexp' & co. do not need
to scan that list for file-like objects.
* guix/packages.scm (<origin>)[patch-flags]: Default to
%DEFAULT-PATCH-FLAGS.
(%default-patch-flags): New variable.
(patch-and-repack): #:flags defaults to %DEFAULT-PATCH-FLAGS.
(origin->derivation): Don't expect FLAGS to be a list.
---
guix/packages.scm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/guix/packages.scm b/guix/packages.scm
index 36e55c0..cbe8004 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -276,8 +276,8 @@ as base32. Otherwise, it must be a bytevector."
(default '()) (delayed))
(snippet origin-snippet (default #f)) ; sexp or #f
- (patch-flags origin-patch-flags ; list of strings
- (default '("-p1")))
+ (patch-flags origin-patch-flags ; string-list gexp
+ (default %default-patch-flags))
;; Patching requires Guile, GNU Patch, and a few more. These two fields are
;; used to specify these dependencies when needed.
@@ -325,6 +325,9 @@ specifications to 'hash'."
(set-record-type-printer! <origin> print-origin)
+(define %default-patch-flags
+ #~("-p1"))
+
(define (origin-actual-file-name origin)
"Return the file name of ORIGIN, either its 'file-name' field or the file
name of its URI."
@@ -594,7 +597,7 @@ the build code of derivation."
#:key
inputs
(snippet #f)
- (flags '("-p1"))
+ (flags %default-patch-flags)
(modules '())
(guile-for-build (%guile-for-build))
(system (%current-system)))
@@ -1622,7 +1625,7 @@ unless you know what you are doing."
(content-hash-value hash)
name #:system system))
(($ <origin> uri method hash name (= force (patches ...)) snippet
- (flags ...) inputs (modules ...) guile-for-build)
+ flags inputs (modules ...) guile-for-build)
;; Patches and/or a snippet.
(mlet %store-monad ((source (method uri
(content-hash-algorithm hash)
- 01/22: gexp: Add 'with-build-variables'., (continued)
- 01/22: gexp: Add 'with-build-variables'., guix-commits, 2021/03/30
- 02/22: gexp: Optimize 'with-build-variables'., guix-commits, 2021/03/30
- 13/22: packages: Call 'bag-grafts' only on the tip of the package graph., guix-commits, 2021/03/30
- 17/22: gnu: docbook-xsl: Move 'use-modules' form to the top level., guix-commits, 2021/03/30
- 15/22: gexp: Allowed/disallowed references and graphs never refer to grafted inputs., guix-commits, 2021/03/30
- 04/22: packages: Turn 'bag->derivation' into a monadic procedure., guix-commits, 2021/03/30
- 03/22: build-system: Rewrite using gexps., guix-commits, 2021/03/30
- 05/22: packages: Simplify patch instantiation., guix-commits, 2021/03/30
- 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 <=
- 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, 2021/03/30
- 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