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

View file

@ -108,7 +108,9 @@ (define* (unpack #:key source #:allow-other-keys)
(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>.