[Nix-dev] nix-channel can't process channel data from Hydra

Peter Simons simons at cryp.to
Fri Apr 12 12:08:40 CEST 2013


Hi guys,

I have some new information: the file downloaded by nix-channel is
broken because it contains the HTTP headers at its beginning! Check
this out:

 | # nix-channel --update
 | downloading Nix expressions from `http://hydra.cryp.to:8080/project/nixpkgs/channel/latest/nixexprs.tar.bz2'...
 |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
 |                                  Dload  Upload   Total   Spent    Left  Speed
 | 100  129k    0  129k    0     0  25094      0 --:--:--  0:00:05 --:--:-- 31302
 | unpacking channels...
 | bzip2: (stdin) is not a bzip2 file.
 | /nix/store/cv12p8zpy0fp6spirw9ph78byz55r6n0-gnutar-1.26/bin/tar: This does not look like a tar archive
 | /nix/store/cv12p8zpy0fp6spirw9ph78byz55r6n0-gnutar-1.26/bin/tar: Exiting with failure status due to previous errors
 | builder for `/nix/store/bp6a9wn1bldglyc6zf5rlv5vd2r6xagd-crypto.drv' failed with exit code 2
 | error: build of `/nix/store/bp6a9wn1bldglyc6zf5rlv5vd2r6xagd-crypto.drv' failed
 | cannot unpack the channels at /run/current-system/sw/bin/nix-channel line 145.
 |
 | # cat /nix/store/bp6a9wn1bldglyc6zf5rlv5vd2r6xagd-crypto.drv
 | Derive([("out","/nix/store/0ykp0h6rncnqqaw5cbp52n67dcwz75vk-crypto","","")],[],["/nix/store/bs0rjkdd9p6201l2izh1fai8xlb7dms3-unpack-channel.sh","/nix/store/p4p0n0fkv9m5pkid5fzsxmf0ihw7n19i-nixexprs.tar.bz2"],"x86_64-linux","/nix/store/yw62q6acrpjnx2r1zg9bzsn7xld1y00s-bash-4.2-p42/bin/bash",["-e","/nix/store/bs0rjkdd9p6201l2izh1fai8xlb7dms3-unpack-channel.sh"],[("PATH","/nix/store/qkj5cxknwspz8ak0ganm97zfr2bhksgn-nix-1.5.2pre3082_2398417/bin:/nix/store/k0kd4brqjm1017bhyj8rkyy36n0v5kmh-coreutils-8.21/bin"),("__noChroot","1"),("binaryCacheURL","\nHTTP/1.1 200 OK\nContent-Encoding: utf-8\nContent-Length: 26\nContent-Type: text/plain\nSet-Cookie: hydra_session=f3c785aed583027e28291f09f266a4b55179f83d; path=/; expires=Sun, 14-Apr-2013 09:48:36 GMT; HttpOnly\nDate: Fri, 12 Apr 2013 09:48:36 GMT\nConnection: keep-alive\n\nhttp://hydra.cryp.to:8080/"),("builder","/nix/store/yw62q6acrpjnx2r1zg9bzsn7xld1y00s-bash-4.2-p42/bin/bash"),("channelName","crypto"),("name","crypto"),("out","/nix/store/0ykp0h6rncnqqaw5cbp52n67dcwz75vk-crypto"),("preferLocalBuild","1"),("src","/nix/store/p4p0n0fkv9m5pkid5fzsxmf0ihw7n19i-nixexprs.tar.bz2"),("system","x86_64-linux")])
 |
 | # head /nix/store/p4p0n0fkv9m5pkid5fzsxmf0ihw7n19i-nixexprs.tar.bz2
 |
 | HTTP/1.1 200 OK
 | Content-Length: 132523
 | Content-Type: application/x-bzip2
 | Set-Cookie: hydra_session=2862473651b3d62aaee16641bc80776a74f69e05; path=/; expires=Sun, 14-Apr-2013 09:48:38 GMT; HttpOnly
 | Date: Fri, 12 Apr 2013 09:48:42 GMT
 | Connection: keep-alive
 |
 | [... binary data here ...]

Now, if I run exactly the same command in the shell that nix-channel
runs, then the download works just fine:

 | # PRINT_PATH=1 QUIET=1 nix-prefetch-url http://hydra.cryp.to:8080/project/nixpkgs/channel/latest/nixexprs.tar.bz2
 |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
 |                                  Dload  Upload   Total   Spent    Left  Speed
 | 100  129k  100  129k    0     0  62947      0  0:00:02  0:00:02 --:--:-- 62959
 | 0g8vhrfd2za1dqvlf875z35gb5n48yif9ax4v7nx7m85k3l4kssd
 | /nix/store/gnh8jlxy8k3ippn6py79nf69p08gsxxm-nixexprs.tar.bz2
 |
 | # bzip2 -vt /nix/store/gnh8jlxy8k3ippn6py79nf69p08gsxxm-nixexprs.tar.bz2
 |   /nix/store/gnh8jlxy8k3ippn6py79nf69p08gsxxm-nixexprs.tar.bz2: ok

This issue occurs only with the Hydra instance I run on hydra.cryp.to
(which is the latest available version from Github). On contrast, the
instance on hydra.nixos.org work fine.

Does anyone have any idea how to remedy this issue?

Take care,
Peter



More information about the nix-dev mailing list