tvl-depot/tvix/nix-compat/src
Brian Olsen eff2cc4f68 fix(tvix/nix-compat): Make CAHash deserialize more formats
Currently CAHash only deserializes the hash in hex code while
the serializer outputs a nixbase32 hash. This means that you can't currently
deserialize what has been serialized.

This change makes deserialize support any digest format (so hex, nixbase32
and base64) as well as flattens the deserialize code and error handling.

It also implements serde methods of HashAlgo directly using Display and TryFrom
implementations because otherwise these would get serialized as eg. Sha256 instead
of sha256 which also broke CAHash serialize/deserialize.

Change-Id: I1941a72eaec741e4956292adaaf0115b97f260ba
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11082
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-03-03 13:07:18 +00:00
..
aterm docs(nix-compat/aterm/parser): fix docstring 2023-12-21 16:43:44 +00:00
bin docs(nix-compat/drvfmt): fix reference 2023-12-21 16:39:07 +00:00
derivation fix(tvix/nix-compat): Make CAHash deserialize more formats 2024-03-03 13:07:18 +00:00
nar chore(3p/sources): Bump channels & overlays 2024-01-19 21:47:32 +00:00
narinfo docs(nix-compat/narinfo): fix reference 2023-12-21 16:36:34 +00:00
nixhash fix(tvix/nix-compat): Make CAHash deserialize more formats 2024-03-03 13:07:18 +00:00
store_path refactor(nix-compat/store_path): simplify build_ca_path 2024-02-22 17:57:55 +00:00
lib.rs feat(tvix/nix-compat): add narinfo parsing and serialisation 2023-10-27 16:08:06 +00:00
nixbase32.rs refactor(nix-compat/nixbase32): address clippy 2023-12-09 12:58:39 +00:00