How to update binary-hashes.nix

Some packages uses binary-hashes.nix like pytorch-bin.
How do you update the binary-hashes.nix?
Do you have a tool to update it like niv?

I’ve found the code to make binary-hashes.nix.