Suppose i’ve got a zip file available under some URL. I need to get its hash, which should be identical to the one output by nix-prefetch-url --unpack <URL>
, but without a working Nix installation. How can one do it?
I tried to understand the C++ implementation of nix-prefetch-url
in nix/prefetch.cc at 027f6a735fa72b65825eb9fa870affed045c8f1d · NixOS/nix · GitHub, but it’s a bit complicated.