civodul pushed a commit to branch wip-build-systems-gexp in repository guix.
commit 6689d1f34db3191ee9d370d3b15a25c4ba2cddb8 Author: Ludovic Courtès <[email protected]> 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
