about summary refs log tree commit diff
path: root/tvix/tools/turbofetch/Cargo.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-02-07T08·21+0100
committerclbot <clbot@tvl.fyi>2024-02-07T20·03+0000
commit4e040e8bc491bcee930ee7e59d6e68ef87c35bb6 (patch)
tree424105706cbfb64029e7d3799f752c1c48196dfc /tvix/tools/turbofetch/Cargo.nix
parent70c068df51c46cecb44453bf2e0dcab8c07afe14 (diff)
chore(tvix/tools/turbofetch): bump magic-buffer to 0.1.1 r/7481
This contains https://github.com/sklose/magic-buffer/pull/4, so we don't
have to impl Send ourselves.

Change-Id: If046596e13345ad4fec22209440e65859e44d540
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10748
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
Diffstat (limited to 'tvix/tools/turbofetch/Cargo.nix')
-rw-r--r--tvix/tools/turbofetch/Cargo.nix31
1 files changed, 22 insertions, 9 deletions
diff --git a/tvix/tools/turbofetch/Cargo.nix b/tvix/tools/turbofetch/Cargo.nix
index 42284eb7d036..d7263727e2dd 100644
--- a/tvix/tools/turbofetch/Cargo.nix
+++ b/tvix/tools/turbofetch/Cargo.nix
@@ -1,4 +1,4 @@
-# This file was @generated by crate2nix 0.11.0 with the command:
+# This file was @generated by crate2nix 0.13.0 with the command:
 #   "generate" "--all-features"
 # See https://github.com/kolloch/crate2nix for more info.
 
@@ -1976,9 +1976,9 @@ rec {
       };
       "magic-buffer" = rec {
         crateName = "magic-buffer";
-        version = "0.1.0";
+        version = "0.1.1";
         edition = "2021";
-        sha256 = "0a8b6zbsnii04il7r1dhqmcfrimf769aaywdlc1x6f44jv5ywr8q";
+        sha256 = "0bpzcrwq89cc5q8mgkmsyx39vjsqaxvaxs29qp8k04rndc7ysfh0";
         authors = [
           "Sebastian Klose <mail@sklose.com>"
         ];
@@ -2511,6 +2511,7 @@ rec {
         crateName = "ring";
         version = "0.16.20";
         edition = "2018";
+        links = "ring-asm";
         sha256 = "1z682xp7v38ayq9g9nkbhhfpj6ygralmlx7wdmsfv8rnw99cylrh";
         authors = [
           "Brian Smith <brian@briansmith.org>"
@@ -2589,6 +2590,7 @@ rec {
         crateName = "ring";
         version = "0.17.5";
         edition = "2021";
+        links = "ring_core_0_17_5";
         sha256 = "02sd768l7594rm3jw048z7kkml7zcyw4ir62p6cxirap8wq0a0pv";
         authors = [
           "Brian Smith <brian@briansmith.org>"
@@ -4683,6 +4685,7 @@ rec {
         crateName = "wasm-bindgen-shared";
         version = "0.2.88";
         edition = "2018";
+        links = "wasm_bindgen";
         sha256 = "02vmw2rzsla1qm0zgfng4kqz52xn8k54v8ads4g1macv09fnq10d";
         authors = [
           "The wasm-bindgen Developers"
@@ -5751,6 +5754,7 @@ rec {
         crateName = "zstd-sys";
         version = "1.6.2+zstd.1.5.1";
         edition = "2018";
+        links = "zstd";
         sha256 = "17xcr0mw8ps9hlc8m0dzj7yd52lb9r9ic9fbpxa4994yilj2zbrd";
         authors = [
           "Alexandre Bury <alexandre.bury@gmail.com>"
@@ -5797,12 +5801,12 @@ rec {
       os = pkgs.rust.lib.toTargetOs platform;
       arch = pkgs.rust.lib.toTargetArch platform;
       family = pkgs.rust.lib.toTargetFamily platform;
+      vendor = pkgs.rust.lib.toTargetVendor platform;
       env = "gnu";
       endian =
         if platform.parsed.cpu.significantByte.name == "littleEndian"
         then "little" else "big";
       pointer_width = toString platform.parsed.cpu.bits;
-      vendor = platform.parsed.vendor.name;
       debug_assertions = false;
     };
 
@@ -5874,7 +5878,6 @@ rec {
               (
                 _: {
                   buildTests = true;
-                  release = false;
                 }
               );
             # If the user hasn't set any pre/post commands, we don't want to
@@ -5899,6 +5902,16 @@ rec {
             # recreate a file hierarchy as when running tests with cargo
 
             # the source for test data
+            # It's necessary to locate the source in $NIX_BUILD_TOP/source/
+            # instead of $NIX_BUILD_TOP/
+            # because we compiled those test binaries in the former and not the latter.
+            # So all paths will expect source tree to be there and not in the build top directly.
+            # For example: $NIX_BUILD_TOP := /build in general, if you ask yourself.
+            # TODO(raitobezarius): I believe there could be more edge cases if `crate.sourceRoot`
+            # do exist but it's very hard to reason about them, so let's wait until the first bug report.
+            mkdir -p source/
+            cd source/
+
             ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${crate.src}
 
             # build outputs
@@ -6098,9 +6111,9 @@ rec {
                     let
                       package = crateConfigs."${dep.packageId}";
                     in
-                    { inherit (dep) rename; version = package.version; };
+                    { inherit (dep) rename; inherit (package) version; };
                 in
-                lib.mapAttrs (name: choices: builtins.map versionAndRename choices) grouped;
+                lib.mapAttrs (name: builtins.map versionAndRename) grouped;
             in
             buildRustCrateForPkgsFunc pkgs
               (
@@ -6148,7 +6161,7 @@ rec {
     */
     sanitizeForJson = val:
       if builtins.isAttrs val
-      then lib.mapAttrs (n: v: sanitizeForJson v) val
+      then lib.mapAttrs (n: sanitizeForJson) val
       else if builtins.isList val
       then builtins.map sanitizeForJson val
       else if builtins.isFunction val
@@ -6257,7 +6270,7 @@ rec {
           enabledFeatures = enableFeatures (crateConfig.dependencies or [ ]) expandedFeatures;
           depWithResolvedFeatures = dependency:
             let
-              packageId = dependency.packageId;
+              inherit (dependency) packageId;
               features = dependencyFeatures enabledFeatures dependency;
             in
             { inherit packageId features; };