[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/11: packages: Simplify patch instantiation.
From: |
Ludovic Courtès |
Subject: |
08/11: packages: Simplify patch instantiation. |
Date: |
Sun, 25 Jun 2017 16:12:15 -0400 (EDT) |
civodul pushed a commit to branch wip-build-systems-gexp
in repository guix.
commit 376faa2e460356edff9bb52cbeb1e09ee685089f
Author: Ludovic Courtès <address@hidden>
Date: 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.
---
guix/packages.scm | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/guix/packages.scm b/guix/packages.scm
index 4f92ef2..3621cfe 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -478,17 +478,16 @@ 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))))
+ patch)))
(mlet %store-monad ((tar -> (lookup-input "tar"))
(xz -> (lookup-input "xz"))
(patch -> (lookup-input "patch"))
(locales -> (lookup-input "locales"))
(decomp -> (lookup-input decompression-type))
- (patches (sequence %store-monad
- (map instantiate-patch patches))))
+ (patches -> (map instantiate-patch patches)))
(define build
(with-imported-modules '((guix build utils))
#~(begin
- branch wip-build-systems-gexp created (now 0b64b8c), Ludovic Courtès, 2017/06/25
- 03/11: gexp: Micro-optimize sexp serialization., Ludovic Courtès, 2017/06/25
- 08/11: packages: Simplify patch instantiation.,
Ludovic Courtès <=
- 05/11: packages: Turn 'bag->derivation' into a monadic procedure., Ludovic Courtès, 2017/06/25
- 01/11: gnu: bootstrap: Move 'use-modules' forms to the beginning of build expressions., Ludovic Courtès, 2017/06/25
- 04/11: tests: Add 'test-assertm' to (guix tests)., Ludovic Courtès, 2017/06/25
- 09/11: Use 'mapm' instead of 'sequence' + 'map'., Ludovic Courtès, 2017/06/25
- 06/11: store: Add a functional object cache and use it in 'lower-object'., Ludovic Courtès, 2017/06/25
- 11/11: packages: Turn 'cache!' into a single-value-return cache., Ludovic Courtès, 2017/06/25
- 10/11: gexp: 'imported-files' takes file-like objects., Ludovic Courtès, 2017/06/25
- 07/11: DRAFT gexp: Handle list conversion to <gexp-input> in the expanded code., Ludovic Courtès, 2017/06/25
- 02/11: build-system: Rewrite using gexps., Ludovic Courtès, 2017/06/25