The Nix hash property on mkDerivation-alike function is an SRI of NAR (Nix Archive).

flowchart LR
	Store[/Nix Store/] --> NAR[Turn into NAR]
	NAR  --> Hash[Hash using sha256/sha512]
	Hash --> SRI[Turn sha256/sha512 hash to SRI]
	SRI  --> Result[/SRI string/]

In practice, it should look like this Nushell code below:

encode nar ./path   # Encode ./path as a NAR
| hash sha256 -b    # Hash using sha256
| encode base64               # SRI process: Encode hash as a base64
| ["sha256-" $in] | str join  # SRI process: Complete the base64'd hash as SRI