guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cannot use snippets with zip source


From: Ricardo Wurmus
Subject: cannot use snippets with zip source
Date: Mon, 9 Feb 2015 11:54:02 +0100

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 via email to

[Prev in Thread] Current Thread [Next in Thread]