I just got asked this question: How do I find the SHA256 for a fetchGitHub
in Nix expressions without faking it and getting it from the error message?
Install nix-prefetch-github
:
$ nix-env -i nix-prefetch-github
installing 'nix-prefetch-github-1.3'
these paths will be fetched (0.67 MiB download, 3.24 MiB unpacked):
...
- Profit:
$ nix-prefetch-github --rev v0.6.4 yaoweibin ngx_http_substitutions_filter_module
{
"owner": "yaoweibin",
"repo": "ngx_http_substitutions_filter_module",
"rev": "v0.6.4",
"sha256": "0q86cv0mfffh43id5xanywyhpd7b0jijrmk8y311c13l9ajrd2rx"
}