Open chriswarbo opened 4 years ago
That's annoying. According to @edolstra, it's a server error: https://github.com/NixOS/nix/issues/1568
Looks like setting accept-encoding
will correctly return a gzip
, with Content-Encoding: gzip
header:
$ curl -v -H 'Accept-Encoding: gzip' http://skulpture.maxiom.de/releases/skulpture-0.2.4.tar.gz | tar -z --list | head
* Connected to skulpture.maxiom.de (2a01:238:20a:202:1092::) port 80 (#0)
> GET /releases/skulpture-0.2.4.tar.gz HTTP/1.1
> Host: skulpture.maxiom.de
> User-Agent: curl/7.70.0
> Accept: */*
> Accept-Encoding: gzip
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 26 Aug 2020 09:42:57 GMT
< Server: Apache/2.4.43 (Unix)
< Last-Modified: Mon, 02 Apr 2018 18:22:19 GMT
< ETag: "1d9ca-568e1ab957357"
< Accept-Ranges: bytes
< Content-Length: 121290
< Content-Type: application/x-tar
< Content-Encoding: gzip
<
{ [4020 bytes data]
skulpture-0.2.4/
skulpture-0.2.4/README.html
skulpture-0.2.4/README
skulpture-0.2.4/CMakeLists.txt
skulpture-0.2.4/NEWS
skulpture-0.2.4/INSTALL
skulpture-0.2.4/src/
skulpture-0.2.4/src/CMakeLists.txt
skulpture-0.2.4/src/.directory
skulpture-0.2.4/src/config/
...
Unfortunately it doesn't look like nix-prefetch-url
allows setting headers. Might be worth opening an issue on the Nix tracker!
I just got this output from niv:
This was on an i686-linux install of NixOS 19.09, with this version of niv:
Looks like a problem with nix-prefetch-url (with or without --unpack) and this server's response headers:
It works with
fetchurl
from nixpkgs: