Skip to content

Instantly share code, notes, and snippets.

@CMCDragonkai
Created June 11, 2020 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CMCDragonkai/72fa7a24475a77a2bcf45e8cb54e9988 to your computer and use it in GitHub Desktop.
Save CMCDragonkai/72fa7a24475a77a2bcf45e8cb54e9988 to your computer and use it in GitHub Desktop.
Acquiring the Nix hash of a large file #nix

Acquiring the Nix hash of a large file

Normally you could use nix-prefetch-url. However it doesn't work when the files don't fit into memory.

For those cases, you should use:

wget https://url-to-large-file.com/file.zip
nix-hash --flat --base32 --type sha256 ./file.zip

This will get you what you need.

However you can also just use an all 0 hashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment