You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.
On bad connections, loading a single big file in one go is a non-starter. That's why curl has option -C for continue/resume, and other tools have similar options. Nix should use it. This assumes that Nix should somehow be able to determine the total size at the beginning of the download query, and/or cache it together with a digest of the file, and that it should detect issues that lead to incomplete download, so as not to delete the partial file in those cases (as opposed to cases of file corruption).
This all suggests that, like apt, nix should have a download protocol that knows about partial files and resume, and use that instead of a trivial curl.
(This issue might be for nix rather than nixos.)
The text was updated successfully, but these errors were encountered:
It's actually for both Nix and Nixpkgs, but not NixOS :-)
Nix's substituters (i.e. for downloading binaries) can probably be made to use -C fairly easily.
Nixpkgs' fetchurl is trickier because it may run under a build user uid. So having a shared cache for partially downloaded files is hard. OTOH, fetchurl does use curl's --retry flag, so maybe in combination with -C, curl will do resumes automatically?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
On bad connections, loading a single big file in one go is a non-starter. That's why curl has option -C for continue/resume, and other tools have similar options. Nix should use it. This assumes that Nix should somehow be able to determine the total size at the beginning of the download query, and/or cache it together with a digest of the file, and that it should detect issues that lead to incomplete download, so as not to delete the partial file in those cases (as opposed to cases of file corruption).
This all suggests that, like apt, nix should have a download protocol that knows about partial files and resume, and use that instead of a trivial curl.
(This issue might be for nix rather than nixos.)
The text was updated successfully, but these errors were encountered: