diff options
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/distcheck.scm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/build-aux/distcheck.scm b/build-aux/distcheck.scm index 4b08c66..83e3db3 100644 --- a/build-aux/distcheck.scm +++ b/build-aux/distcheck.scm @@ -39,13 +39,17 @@ arguments." (cut proc port) (cut close-pipe port)))))) +(define (call-with-archive-file archive file proc) + "Call PROC with port reading FILE in lzip compressed tar ARCHIVE." + (call-with-input-pipe (list "tar" "--extract" "--to-stdout" + "--file" archive + (string-append (basename archive ".tar.lz") + "/" file)) + proc)) + (define (package-in-archive dist-archive) "Return the package object in guix.scm of DIST-ARCHIVE." - (call-with-input-pipe (list "tar" "--extract" "--to-stdout" - "--file" dist-archive - (string-append - (basename dist-archive ".tar.lz") - "/guix.scm")) + (call-with-archive-file dist-archive "guix.scm" (lambda (port) (eval-string (get-string-all port) #:file (string-append (getcwd) "/guix.scm"))))) |