build-system/gnu: Add support for zip archives.

Fixes <http://bugs.gnu.org/19866>.
Reported by Andreas Enge <andreas@enge.fr>.

* guix/build/gnu-build-system.scm (unpack): Use 'unzip' when SOURCE ends
  in '.zip'.
This commit is contained in:
Ludovic Courtès 2015-02-26 22:46:26 +01:00
parent 93be4e8e6c
commit cd0385b61a
1 changed files with 3 additions and 1 deletions

View File

@ -108,7 +108,9 @@ working directory."
(copy-recursively source "."
#:keep-mtime? #t)
#t)
(and (zero? (system* "tar" "xvf" source))
(and (if (string-suffix? ".zip" source)
(zero? (system* "unzip" source))
(zero? (system* "tar" "xvf" source)))
(chdir (first-subdirectory ".")))))
;; See <http://bugs.gnu.org/17840>.