diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-02-26 22:46:26 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-02-26 22:48:33 +0100 |
commit | cd0385b61a934eafe1601e7c22024cf452d357c2 (patch) | |
tree | 561cf4cc3dd59a604cec1e5c43fca663c6b0bbaf /guix/build/gnu-build-system.scm | |
parent | 93be4e8e6c6b82a5825b56cce991563bf19aaaf2 (diff) | |
download | gnu-guix-cd0385b61a934eafe1601e7c22024cf452d357c2.tar gnu-guix-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'.
Diffstat (limited to 'guix/build/gnu-build-system.scm')
-rw-r--r-- | guix/build/gnu-build-system.scm | 4 |
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>. |