all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* cannot use snippets with zip source
@ 2015-02-09 10:54 Ricardo Wurmus
  2015-02-09 12:35 ` Andreas Enge
  2015-02-09 23:00 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2015-02-09 10:54 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cannot use snippets with zip source
  2015-02-09 10:54 cannot use snippets with zip source Ricardo Wurmus
@ 2015-02-09 12:35 ` Andreas Enge
  2015-02-09 23:00 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Enge @ 2015-02-09 12:35 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix-devel

On Mon, Feb 09, 2015 at 11:54:02AM +0100, Ricardo Wurmus wrote:
> 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).

Actually, I recently wondered about the same thing concerning a single
file I wanted to download and patch. I suppose this makes the problem
even worse... Anyway, in my case it is more a distraction, as I can easily
run the snippet in the install phase.

Andreas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cannot use snippets with zip source
  2015-02-09 10:54 cannot use snippets with zip source Ricardo Wurmus
  2015-02-09 12:35 ` Andreas Enge
@ 2015-02-09 23:00 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-02-09 23:00 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix-devel

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> Is there a way to use snippets with zip archives?

Currently no, as you noted.  That could be fixed though (please file it
to bug-guix@gnu.org so we don’t lose track of it.)

> Could `patch-and-repack' be modified to use the package's "unpack"
> phase instead of implementing its own unpack mechanism?

Not really, but we can fix ‘patch-and-repack’ anyway.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-09 23:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 10:54 cannot use snippets with zip source Ricardo Wurmus
2015-02-09 12:35 ` Andreas Enge
2015-02-09 23:00 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.