unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: Guix-devel <guix-devel@gnu.org>
Subject: cannot use snippets with zip source
Date: Mon, 9 Feb 2015 11:54:02 +0100	[thread overview]
Message-ID: <idjmw4n73ud.fsf@bimsb-sys02.mdc-berlin.net> (raw)

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

             reply	other threads:[~2015-02-09 10:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 10:54 Ricardo Wurmus [this message]
2015-02-09 12:35 ` cannot use snippets with zip source Andreas Enge
2015-02-09 23:00 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=idjmw4n73ud.fsf@bimsb-sys02.mdc-berlin.net \
    --to=ricardo.wurmus@mdc-berlin.de \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).