From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: cannot use snippets with zip source Date: Mon, 9 Feb 2015 11:54:02 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKlyp-00036V-8j for guix-devel@gnu.org; Mon, 09 Feb 2015 05:54:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKlyl-0000CQ-RU for guix-devel@gnu.org; Mon, 09 Feb 2015 05:54:15 -0500 Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:47994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKlyl-0000CH-Ej for guix-devel@gnu.org; Mon, 09 Feb 2015 05:54:11 -0500 Received: from localhost (localhost [127.0.0.1]) by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 504E9380F2B for ; Mon, 9 Feb 2015 11:54:09 +0100 (CET) Received: from pegasus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (pegasus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cqgJabMM3V7M for ; Mon, 9 Feb 2015 11:54:03 +0100 (CET) Received: from HTCATWO.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Mon, 9 Feb 2015 11:54:03 +0100 (CET) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel Hi Guix, I'm packaging HISAT whose sources are available as a zip archive. This means that I have to replace the unpack phase to use "unzip" to unpack the source archive. Unfortunately, it seems that I cannot use snippets for "static" patches to the sources when a zip archive is used (rather than a tarball). When I use snippets, guix determines the decompression type to be "xz" and then fails: ~~~~~~~ The following derivations will be built: /gnu/store/jra0psbhjkcf66rdmj5bshivf32nyf73-hisat-0.1.4.drv /gnu/store/1hpkf8yl4hcifzalnwh2hj6qwi8jid3w-hisat-0.1.4-beta-source.tar.xz.drv /gnu/store/pri51516agpcm9k6asgbdmspxnim3l7q-hisat-0.1.4.drv @ build-started /gnu/store/1hpkf8yl4hcifzalnwh2hj6qwi8jid3w-hisat-0.1.4-beta-source.tar.xz.drv - x86_64-linux /var/log/guix/drvs/1h//pkf8yl4hcifzalnwh2hj6qwi8jid3w-hisat-0.1.4-beta-source.tar.xz.drv.bz2 /gnu/store/c4km8376y174q7gxqahf4hc1i1xaqkqh-tar-1.28/bin/tar: This does not look like a tar archive /gnu/store/c4km8376y174q7gxqahf4hc1i1xaqkqh-tar-1.28/bin/tar: Skipping to next header /gnu/store/c4km8376y174q7gxqahf4hc1i1xaqkqh-tar-1.28/bin/tar: Exiting with failure status due to previous errors builder for `/gnu/store/1hpkf8yl4hcifzalnwh2hj6qwi8jid3w-hisat-0.1.4-beta-source.tar.xz.drv' failed with exit code 1 @ build-failed /gnu/store/1hpkf8yl4hcifzalnwh2hj6qwi8jid3w-hisat-0.1.4-beta-source.tar.xz.drv - 1 builder for `/gnu/store/1hpkf8yl4hcifzalnwh2hj6qwi8jid3w-hisat-0.1.4-beta-source.tar.xz.drv' failed with exit code 1 cannot build derivation `/gnu/store/pri51516agpcm9k6asgbdmspxnim3l7q-hisat-0.1.4.drv': 1 dependencies couldn't be built cannot build derivation `/gnu/store/jra0psbhjkcf66rdmj5bshivf32nyf73-hisat-0.1.4.drv': 1 dependencies couldn't be built killing process 2524 guix build: error: build failed: build of `/gnu/store/jra0psbhjkcf66rdmj5bshivf32nyf73-hisat-0.1.4.drv' failed ~~~~~~~ That's probably due to the definiton of `decompression-type' in `patch-and-repack' in the file guix/packages.scm: ~~~~~~ (define decompression-type (cond ((string-suffix? "gz" source-file-name) "gzip") ((string-suffix? "bz2" source-file-name) "bzip2") ((string-suffix? "lz" source-file-name) "lzip") (else "xz"))) ~~~~~~ Is there a way to use snippets with zip archives? Could `patch-and-repack' be modified to use the package's "unpack" phase instead of implementing its own unpack mechanism? ~~ Ricardo