[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/11: packages: Simplify patch instantiation.
From: |
guix-commits |
Subject: |
03/11: packages: Simplify patch instantiation. |
Date: |
Thu, 18 Feb 2021 17:40:10 -0500 (EST) |
civodul pushed a commit to branch wip-build-systems-gexp
in repository guix.
commit 27b9020c1e5c972074b899d6c13b28b59e172905
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jun 25 15:31:37 2017 +0200
packages: Simplify patch instantiation.
* guix/packages.scm (patch-and-repack)[instantiate-patch]: Use
'local-file' instead of 'interned-file'. When PATCH is a struct, return
it. Use 'let' instead of 'mlet'.
---
guix/packages.scm | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/guix/packages.scm b/guix/packages.scm
index 2b59cd8..845985b 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -635,21 +635,19 @@ specifies modules in scope when evaluating SNIPPET."
(define instantiate-patch
(match-lambda
((? string? patch) ;deprecated
- (interned-file patch #:recursive? #t))
+ (local-file patch #:recursive? #t))
((? struct? patch) ;origin, local-file, etc.
- (lower-object patch system))))
-
- (mlet %store-monad ((tar -> (lookup-input "tar"))
- (gzip -> (lookup-input "gzip"))
- (bzip2 -> (lookup-input "bzip2"))
- (lzip -> (lookup-input "lzip"))
- (xz -> (lookup-input "xz"))
- (patch -> (lookup-input "patch"))
- (locales -> (lookup-input "locales"))
- (comp -> (and=> (compressor source-file-name)
- lookup-input))
- (patches (sequence %store-monad
- (map instantiate-patch patches))))
+ patch)))
+
+ (let ((tar (lookup-input "tar"))
+ (gzip (lookup-input "gzip"))
+ (bzip2 (lookup-input "bzip2"))
+ (lzip (lookup-input "lzip"))
+ (xz (lookup-input "xz"))
+ (patch (lookup-input "patch"))
+ (locales (lookup-input "locales"))
+ (comp (and=> (compressor source-file-name) lookup-input))
+ (patches (map instantiate-patch patches)))
(define build
(with-imported-modules '((guix build utils))
#~(begin
- branch wip-build-systems-gexp created (now 54f5407), guix-commits, 2021/02/18
- 04/11: packages: Core procedures are written in monadic style., guix-commits, 2021/02/18
- 09/11: gexp: Keep 'lower-inputs' private., guix-commits, 2021/02/18
- 07/11: gexp: 'gexp-inputs' returns a list of <gexp-input> records., guix-commits, 2021/02/18
- 03/11: packages: Simplify patch instantiation.,
guix-commits <=
- 11/11: store: Object cache profiling shows the number of entries., guix-commits, 2021/02/18
- 10/11: gexp: Micro-optimize 'gexp->sexp' and 'lower-inputs'., guix-commits, 2021/02/18
- 08/11: gexp: 'gexp-inputs' returns both native and non-native inputs., guix-commits, 2021/02/18
- 06/11: squash! build-system: Rewrite using gexps., guix-commits, 2021/02/18
- 01/11: build-system: Rewrite using gexps., guix-commits, 2021/02/18
- 02/11: packages: Turn 'bag->derivation' into a monadic procedure., guix-commits, 2021/02/18
- 05/11: gexp: Micro-optimize sexp serialization., guix-commits, 2021/02/18