Open
Description
Describe the bug
When running nix flake update
, it downloads the tar.gz
file, which takes a lot of time. This usually takes me a minute, but for my colleagues, it takes some time up to half an hour.
![image](https://private-user-images.githubusercontent.com/6224096/329837031-7da0b596-4263-4f1f-a7f8-ffec73bb9399.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NTU4MjYsIm5iZiI6MTczOTQ1NTUyNiwicGF0aCI6Ii82MjI0MDk2LzMyOTgzNzAzMS03ZGEwYjU5Ni00MjYzLTRmMWYtYTdmOC1mZmVjNzNiYjkzOTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMTQwNTI2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODIxOTcyMTU1YmYyZjA3NDVmZDAyYWU4YTQyNjI1ZjYyYmE5MDk3ZTJmZGVkNWE0NDdlNTg5YjhiZDRjMGI2OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.A9D1J_byqV94H7qZDh667us_WQ8gkF8N4A3xXNdnLxI)
The same download using curl takes just a second:
❯ time curl -L -o foo.tar.gz 'https://github.com/NixOS/nixpkgs/archive/e4e7a43a9db7e22613accfeb1005cca1b2b1ee0d.tar.gz'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 40.4M 100 40.4M 0 0 24.2M 0 0:00:01 0:00:01 --:--:-- 28.5M
________________________________________________________
Executed in 1.68 secs fish external
usr time 225.63 millis 92.00 micros 225.54 millis
sys time 129.86 millis 978.00 micros 128.89 millis
I suspect that Nix does a range download and GitHub does not like that and have to export the tar always again from GIt 🤔
Steps To Reproduce
- Run a
nix flake update
so nixpkgs fetches the new tarball
Expected behavior
A clear and concise description of what you expected to happen.
nix-env --version
output
❯ nix-env --version
nix-env (Nix) 2.22.0
Additional context
Add any other context about the problem here.
Priorities
Add 👍 to issues you find important.