about summary refs log tree commit diff
path: root/tvix/nix-compat/src/nixhash.rs
AgeCommit message (Collapse)AuthorFilesLines
2023-02-08 r/5843 feat(tvix/nix-compat/nixhash): support BASE64_NOPAD SRIFlorian Klink1-19/+61
Nix accepts SRI hashes that are missing their padding characters in base64, as seen in https://github.com/NixOS/nixpkgs/blob/7e49471316373c471a3bf4b78c130ebc907ae2d2/pkgs/development/libraries/kerberos/krb5.nix . It only seems to work in the SRI case, not with `sha256` being set to a (nopad) base64 string. Add regression tests for this, and document why we don't want to support *additional* characters afterwards. Reported in https://b.tvl.fyi/issues/252 Change-Id: I9ffc2b417501b426ced1894a9cbf95ff5f0e5159 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8037 Reviewed-by: Alyssa Ross <hi@alyssa.is> Tested-by: BuildkiteCI
2023-02-08 r/5842 refactor(tvix/nix-compat/nixhash): fix test function nameFlorian Klink1-1/+1
Change-Id: I3b089758ce8c01df544064422e56a97a8402513d Reviewed-on: https://cl.tvl.fyi/c/depot/+/8036 Tested-by: BuildkiteCI Reviewed-by: Alyssa Ross <hi@alyssa.is>
2023-02-07 r/5841 fix(tvix): fix InvalidEncodedDigestLength messageAlyssa Ross1-1/+1
Before: error[E997]: invalid output hash: invalid encoded digest length '43' for algo 43 After: error[E997]: invalid output hash: invalid encoded digest length '43' for algo sha256 Change-Id: Icb533839586b47f90b4e8d22083cce397f9f3655 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8035 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-02-01 r/5806 feat(tvix/nix-compat): add nixhash moduleFlorian Klink1-0/+358
This module takes care of parsing various hashes and algorithms. It will get used to modify derivation output hashes in the next CL. Change-Id: Idc07c401dbb7510f49883ac02b8379b9a5d930c7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7990 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI