about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-07-20T20·25+0200
committerflokli <flokli@flokli.de>2024-07-20T22·17+0000
commitfca8462530460f7db3c71394d01e0f996d3c5d12 (patch)
treeb3eeaa72aae35d7071feff8569060f1f7c7858de /tvix
parent8b77c7fcd7e9af42dc5145aa9f781dd7c2f05506 (diff)
fix(tvix): fix outputHashes calculation for crates with versions r/8381
In case two crate versions are present, the key in the Cargo.nix file
includes the version number too.

To be able to set a specific hash for "tracing-opentelemetry 0.25.0" for
example, this needs to account for keys with the version included.

Access `crateName`, `version` and `src.outputHash` individually.

Change-Id: Ib9800691a445ac403ff646cb32e85a7a4cbef9d8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11994
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/default.nix b/tvix/default.nix
index 8d393dce4b86..f8aa47a108c5 100644
--- a/tvix/default.nix
+++ b/tvix/default.nix
@@ -15,8 +15,8 @@ let
     # and the outputHash as value.
     outputHashes = builtins.listToAttrs
       (map
-        (crateName:
-          (lib.nameValuePair "${crateName}-${crates.internal.crates.${crateName}.version}" crates.internal.crates.${crateName}.src.outputHash)
+        (k:
+          (lib.nameValuePair "${crates.internal.crates.${k}.crateName}-${crates.internal.crates.${k}.version}" crates.internal.crates.${k}.src.outputHash)
         ) [
         "wu-manber"
       ]);