diff options
author | Florian Klink <flokli@flokli.de> | 2022-12-29T21·47+0100 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2022-12-30T13·31+0000 |
commit | 357c4d4836180975b4699877b2344d1b2c88d690 (patch) | |
tree | 544aaef634a702cc02f4adb5c6498855064402a9 /tvix/Cargo.nix | |
parent | 5ba47a2bc39b95fa4ece5d52ce08bfeda130367f (diff) |
feat(tvix/store): add nixbase32 mod r/5550
This implements the nix-specific base32 encoding and decoding, exposing a subset of the API that the data-encoding crate provides. Nix uses a custom alphabet, no padding, and encodes bytes in reverse order. The latter one is the reason we can't just use the data-encoding crate directly. Three odd corner case tests ported over from go-nix failed. We opened b/235 to further investigate. Change-Id: I73fab6ddd67177d882e4c3f2b48761c95853d558 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7683 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/Cargo.nix')
-rw-r--r-- | tvix/Cargo.nix | 122 |
1 files changed, 92 insertions, 30 deletions
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix index a72a8d3277f0..89185708f89b 100644 --- a/tvix/Cargo.nix +++ b/tvix/Cargo.nix @@ -1438,6 +1438,20 @@ rec { ]; }; + "data-encoding" = rec { + crateName = "data-encoding"; + version = "2.3.3"; + edition = "2018"; + sha256 = "1yq8jnivxsjzl3mjbjdjg5kfvd17wawbmg1jvsfw6cqmn1n6dn13"; + authors = [ + "Julien Cretin <git@ia0.eu>" + ]; + features = { + "default" = [ "std" ]; + "std" = [ "alloc" ]; + }; + resolvedDefaultFeatures = [ "alloc" "default" "std" ]; + }; "derivation" = rec { crateName = "derivation"; version = "0.1.0"; @@ -1450,31 +1464,23 @@ rec { else ./derivation; dependencies = [ { - name = "blake3"; - packageId = "blake3"; - features = [ "rayon" "std" ]; - } - { - name = "maplit"; - packageId = "maplit"; - } - { - name = "prost"; - packageId = "prost"; + name = "glob"; + packageId = "glob"; } { - name = "tonic"; - packageId = "tonic"; + name = "serde"; + packageId = "serde"; + features = [ "derive" ]; } ]; - buildDependencies = [ + devDependencies = [ { - name = "prost-build"; - packageId = "prost-build"; + name = "serde_json"; + packageId = "serde_json"; } { - name = "tonic-build"; - packageId = "tonic-build"; + name = "test-generator"; + packageId = "test-generator"; } ]; @@ -2724,16 +2730,6 @@ rec { "value-bag" = [ "dep:value-bag" ]; }; }; - "maplit" = rec { - crateName = "maplit"; - version = "1.0.2"; - edition = "2015"; - sha256 = "07b5kjnhrrmfhgqm9wprjw8adx6i225lqp49gasgqg74lahnabiy"; - authors = [ - "bluss" - ]; - - }; "matchit" = rec { crateName = "matchit"; version = "0.7.0"; @@ -5091,6 +5087,64 @@ rec { ]; }; + "test-case" = rec { + crateName = "test-case"; + version = "2.2.2"; + edition = "2018"; + sha256 = "1h4qymhy332lzgg79w696qfxg6wdab5birn8xvfgkczzgmdczmi1"; + authors = [ + "Marcin Sas-Szymanski <marcin.sas-szymanski@anixe.pl>" + "Wojciech Polak <frondeus@gmail.com>" + "Łukasz Biel <lukasz.p.biel@gmail.com>" + ]; + dependencies = [ + { + name = "test-case-macros"; + packageId = "test-case-macros"; + usesDefaultFeatures = false; + } + ]; + features = { + "regex" = [ "dep:regex" ]; + "with-regex" = [ "regex" "test-case-macros/with-regex" ]; + }; + }; + "test-case-macros" = rec { + crateName = "test-case-macros"; + version = "2.2.2"; + edition = "2018"; + sha256 = "09jvbfvz48v6ya3i25gp3lbr6ym1fz7qyp3l6bcdslwkw7v7nnz4"; + procMacro = true; + authors = [ + "Marcin Sas-Szymanski <marcin.sas-szymanski@anixe.pl>" + "Wojciech Polak <frondeus@gmail.com>" + "Łukasz Biel <lukasz.p.biel@gmail.com>" + ]; + dependencies = [ + { + name = "cfg-if"; + packageId = "cfg-if"; + } + { + name = "proc-macro-error"; + packageId = "proc-macro-error"; + } + { + name = "proc-macro2"; + packageId = "proc-macro2 1.0.47"; + } + { + name = "quote"; + packageId = "quote 1.0.21"; + } + { + name = "syn"; + packageId = "syn 1.0.103"; + features = [ "full" "extra-traits" ]; + } + ]; + features = { }; + }; "test-generator" = rec { crateName = "test-generator"; version = "0.3.0"; @@ -6336,6 +6390,14 @@ rec { features = [ "rayon" "std" ]; } { + name = "data-encoding"; + packageId = "data-encoding"; + } + { + name = "lazy_static"; + packageId = "lazy_static"; + } + { name = "prost"; packageId = "prost"; } @@ -6360,8 +6422,8 @@ rec { ]; devDependencies = [ { - name = "lazy_static"; - packageId = "lazy_static"; + name = "test-case"; + packageId = "test-case"; } ]; |