berberman / nvfetcher

Generate nix sources expr for the latest version of packages
https://nvfetcher.torus.icu
MIT License
178 stars 15 forks source link

Feature request: use fetched hash #42

Closed danielphan2003 closed 2 years ago

danielphan2003 commented 2 years ago

Modrinth has a file API that also includes file hashes like sha512 or sha1. I guess we can use the hash for generating nix expr. Is this a good feature to add or should nix-prefetch-url check for the hash instead?

Try: curl https://api.modrinth.com/api/v1/mod/kKwy3HU9/version | jq -r 'map(.files[])'

berberman commented 2 years ago

nvfetcher calls nvchecker and then uses nix-prefetch to get hashes. If you already have file hashes, I think there's no need to use nvfetcher. Instead, you can write a simple program that interpolates your hashes.

danielphan2003 commented 2 years ago

Make sense, I'll probably close this later.