Today we announce the release of a tiny utility called
rnix-hashes. It's a
very simple utility that allows to convert hash encodings from the 7 different
possible encodings that are used in the Nix world.
The main use-case is that recent versions of Nix emit hash mismatch errors using the SubResource Integrity (SRI) format. But sometimes it is convenient to get the older base32 encoding to be compatible with older versions of Nix for example.
So there you go. We hope that this little utility can be a convenient addition on your tool belt.
A quick example
Here is a quick example to show how it works:
$ rnix-hashes sha256-Y39OVtscIh6VSH4WBwCDM/eGPFEOxzXtgnHU708CnqU= SRI sha256-Y39OVtscIh6VSH4WBwCDM/eGPFEOxzXtgnHU708CnqU= base16 637f4e56db1c221e95487e1607008333f7863c510ec735ed8271d4ef4f029ea5 base32 19cy097yzm3ihbnkbiqfa4y8dxrkhc00f5ky92aiw8hwvdb4wzv3 base64 Y39OVtscIh6VSH4WBwCDM/eGPFEOxzXtgnHU708CnqU=
For now, follow the instructions located at https://github.com/numtide/rnix-hashes.
This utility will become available in nixpkgs-unstable really soon.
rnix as a prefix.
We have a small but growing collection of Nix utilities written in Rust and
they all start with the
rnix prefix. If you want to participate in the
effort, come join us in the #nix-community IRC channel.
Once this project is stable it will be transferred with the other related project in the nix-community org.
That's all! Thanks for reading.