NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.29k stars 1.48k forks source link

nix-prefetch-url doesn't use the fetcher cache #10881

Open fricklerhandwerk opened 3 months ago

fricklerhandwerk commented 3 months ago

Describe the bug

nix-prefetch-url re-downloads the same remote object every time, because it doesn't use the fetcher cache.

Steps To Reproduce

nix-prefetch-url https://github.com/NixOS/nix/archive/refs/heads/master.zip
nix-prefetch-url https://github.com/NixOS/nix/archive/refs/heads/master.zip

Expected behavior

The second invocation does not require a download. But as you observe, it currently does.

Additional context

This is an issue for tools like npins: https://github.com/andir/npins/issues/57

Priorities

Add :+1: to issues you find important.