summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-02-26 22:46:26 +0100
committerLudovic Courtès <ludo@gnu.org>2015-02-26 22:48:33 +0100
commitcd0385b61a934eafe1601e7c22024cf452d357c2 (patch)
tree561cf4cc3dd59a604cec1e5c43fca663c6b0bbaf
parent93be4e8e6c6b82a5825b56cce991563bf19aaaf2 (diff)
downloadguix-cd0385b61a934eafe1601e7c22024cf452d357c2.tar.gz
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'.
-rw-r--r--guix/build/gnu-build-system.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 2880168273..25df711170 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -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>.