chore(tvix/tools/weave): Regenerate Cargo.nix and filter src

The Cargo.lock also got changed because of crate2nix using --freezed.

Change-Id: I79b062eddb13f59c4656a62735df1e527fc91a44
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11970
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Ilan Joselevich 2024-07-09 17:15:41 +02:00 committed by clbot
parent 52b8cf8d1f
commit 64fd1d3e56
3 changed files with 101 additions and 42 deletions

View file

@ -450,9 +450,9 @@ dependencies = [
[[package]] [[package]]
name = "data-encoding" name = "data-encoding"
version = "2.5.0" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
[[package]] [[package]]
name = "der" name = "der"
@ -510,6 +510,17 @@ version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "enum-primitive-derive"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba7795da175654fe16979af73f81f26a8ea27638d8d9823d317016888a63dc4c"
dependencies = [
"num-traits",
"quote",
"syn 2.0.48",
]
[[package]] [[package]]
name = "enum_dispatch" name = "enum_dispatch"
version = "0.3.12" version = "0.3.12"
@ -901,12 +912,16 @@ dependencies = [
"data-encoding", "data-encoding",
"ed25519", "ed25519",
"ed25519-dalek", "ed25519-dalek",
"enum-primitive-derive",
"glob", "glob",
"nom", "nom",
"num-traits",
"pin-project-lite",
"serde", "serde",
"serde_json", "serde_json",
"sha2", "sha2",
"thiserror", "thiserror",
"tokio",
] ]
[[package]] [[package]]

View file

@ -1,4 +1,4 @@
# This file was @generated by crate2nix 0.13.0 with the command: # This file was @generated by crate2nix 0.14.1 with the command:
# "generate" "--all-features" # "generate" "--all-features"
# See https://github.com/kolloch/crate2nix for more info. # See https://github.com/kolloch/crate2nix for more info.
@ -13,6 +13,8 @@
, rootFeatures ? [ "default" ] , rootFeatures ? [ "default" ]
# If true, throw errors instead of issueing deprecation warnings. # If true, throw errors instead of issueing deprecation warnings.
, strictDeprecation ? false , strictDeprecation ? false
# Elements to add to the `-C target-feature=` argument passed to `rustc`
# (separated by `,`, prefixed with `+`).
# Used for conditional compilation based on CPU feature detection. # Used for conditional compilation based on CPU feature detection.
, targetFeatures ? [ ] , targetFeatures ? [ ]
# Whether to perform release builds: longer compile times, faster binaries. # Whether to perform release builds: longer compile times, faster binaries.
@ -974,7 +976,7 @@ rec {
{ {
name = "libc"; name = "libc";
packageId = "libc"; packageId = "libc";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "aarch64-linux-android"); target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "aarch64-linux-android");
} }
{ {
name = "libc"; name = "libc";
@ -1292,9 +1294,9 @@ rec {
}; };
"data-encoding" = rec { "data-encoding" = rec {
crateName = "data-encoding"; crateName = "data-encoding";
version = "2.5.0"; version = "2.6.0";
edition = "2018"; edition = "2018";
sha256 = "1rcbnwfmfxhlshzbn3r7srm3azqha3mn33yxyqxkzz2wpqcjm5ky"; sha256 = "1qnn68n4vragxaxlkqcb1r28d3hhj43wch67lm4rpxlw89wnjmp8";
authors = [ authors = [
"Julien Cretin <git@ia0.eu>" "Julien Cretin <git@ia0.eu>"
]; ];
@ -1506,6 +1508,32 @@ rec {
}; };
resolvedDefaultFeatures = [ "default" "use_std" ]; resolvedDefaultFeatures = [ "default" "use_std" ];
}; };
"enum-primitive-derive" = rec {
crateName = "enum-primitive-derive";
version = "0.3.0";
edition = "2018";
sha256 = "0k6wcf58h5kh64yq5nfq71va53kaya0kzxwsjwbgwm2n2zd9axxs";
procMacro = true;
authors = [
"Doug Goldstein <cardoe@cardoe.com>"
];
dependencies = [
{
name = "num-traits";
packageId = "num-traits";
usesDefaultFeatures = false;
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn 2.0.48";
}
];
};
"enum_dispatch" = rec { "enum_dispatch" = rec {
crateName = "enum_dispatch"; crateName = "enum_dispatch";
version = "0.3.12"; version = "0.3.12";
@ -2562,12 +2590,7 @@ rec {
version = "0.1.0"; version = "0.1.0";
edition = "2021"; edition = "2021";
crateBin = [ ]; crateBin = [ ];
# We can't filter paths with references in Nix 2.4 src = lib.cleanSourceWith { filter = sourceFilter; src = ../../nix-compat; };
# See https://github.com/NixOS/nix/issues/5410
src =
if ((lib.versionOlder builtins.nixVersion "2.4pre20211007") || (lib.versionOlder "2.5" builtins.nixVersion))
then lib.cleanSourceWith { filter = sourceFilter; src = ../../nix-compat; }
else ../../nix-compat;
dependencies = [ dependencies = [
{ {
name = "bitflags"; name = "bitflags";
@ -2590,6 +2613,10 @@ rec {
name = "ed25519-dalek"; name = "ed25519-dalek";
packageId = "ed25519-dalek"; packageId = "ed25519-dalek";
} }
{
name = "enum-primitive-derive";
packageId = "enum-primitive-derive";
}
{ {
name = "glob"; name = "glob";
packageId = "glob"; packageId = "glob";
@ -2598,6 +2625,15 @@ rec {
name = "nom"; name = "nom";
packageId = "nom"; packageId = "nom";
} }
{
name = "num-traits";
packageId = "num-traits";
}
{
name = "pin-project-lite";
packageId = "pin-project-lite";
optional = true;
}
{ {
name = "serde"; name = "serde";
packageId = "serde"; packageId = "serde";
@ -2615,6 +2651,12 @@ rec {
name = "thiserror"; name = "thiserror";
packageId = "thiserror"; packageId = "thiserror";
} }
{
name = "tokio";
packageId = "tokio";
optional = true;
features = [ "io-util" "macros" ];
}
]; ];
devDependencies = [ devDependencies = [
{ {
@ -2623,9 +2665,13 @@ rec {
} }
]; ];
features = { features = {
"async" = [ "futures-util" ]; "async" = [ "tokio" ];
"futures-util" = [ "dep:futures-util" ]; "default" = [ "async" "wire" ];
"pin-project-lite" = [ "dep:pin-project-lite" ];
"tokio" = [ "dep:tokio" ];
"wire" = [ "tokio" "pin-project-lite" ];
}; };
resolvedDefaultFeatures = [ "async" "default" "pin-project-lite" "tokio" "wire" ];
}; };
"nom" = rec { "nom" = rec {
crateName = "nom"; crateName = "nom";
@ -3277,7 +3323,7 @@ rec {
{ {
name = "getrandom"; name = "getrandom";
packageId = "getrandom"; packageId = "getrandom";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "wasm32-unknown-unknown"); target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "wasm32-unknown-unknown");
features = [ "js" ]; features = [ "js" ];
} }
{ {
@ -6384,12 +6430,7 @@ rec {
requiredFeatures = [ ]; requiredFeatures = [ ];
} }
]; ];
# We can't filter paths with references in Nix 2.4 src = lib.cleanSourceWith { filter = sourceFilter; src = ./.; };
# See https://github.com/NixOS/nix/issues/5410
src =
if ((lib.versionOlder builtins.nixVersion "2.4pre20211007") || (lib.versionOlder "2.5" builtins.nixVersion))
then lib.cleanSourceWith { filter = sourceFilter; src = ./.; }
else ./.;
dependencies = [ dependencies = [
{ {
name = "anyhow"; name = "anyhow";
@ -6437,12 +6478,12 @@ rec {
{ {
name = "winapi-i686-pc-windows-gnu"; name = "winapi-i686-pc-windows-gnu";
packageId = "winapi-i686-pc-windows-gnu"; packageId = "winapi-i686-pc-windows-gnu";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "i686-pc-windows-gnu"); target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "i686-pc-windows-gnu");
} }
{ {
name = "winapi-x86_64-pc-windows-gnu"; name = "winapi-x86_64-pc-windows-gnu";
packageId = "winapi-x86_64-pc-windows-gnu"; packageId = "winapi-x86_64-pc-windows-gnu";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-gnu"); target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "x86_64-pc-windows-gnu");
} }
]; ];
features = { features = {
@ -7720,7 +7761,7 @@ rec {
{ {
name = "windows_aarch64_gnullvm"; name = "windows_aarch64_gnullvm";
packageId = "windows_aarch64_gnullvm 0.48.5"; packageId = "windows_aarch64_gnullvm 0.48.5";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "aarch64-pc-windows-gnullvm"); target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "aarch64-pc-windows-gnullvm");
} }
{ {
name = "windows_aarch64_msvc"; name = "windows_aarch64_msvc";
@ -7745,7 +7786,7 @@ rec {
{ {
name = "windows_x86_64_gnullvm"; name = "windows_x86_64_gnullvm";
packageId = "windows_x86_64_gnullvm 0.48.5"; packageId = "windows_x86_64_gnullvm 0.48.5";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-gnullvm"); target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "x86_64-pc-windows-gnullvm");
} }
{ {
name = "windows_x86_64_msvc"; name = "windows_x86_64_msvc";
@ -7767,7 +7808,7 @@ rec {
{ {
name = "windows_aarch64_gnullvm"; name = "windows_aarch64_gnullvm";
packageId = "windows_aarch64_gnullvm 0.52.0"; packageId = "windows_aarch64_gnullvm 0.52.0";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "aarch64-pc-windows-gnullvm"); target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "aarch64-pc-windows-gnullvm");
} }
{ {
name = "windows_aarch64_msvc"; name = "windows_aarch64_msvc";
@ -7792,7 +7833,7 @@ rec {
{ {
name = "windows_x86_64_gnullvm"; name = "windows_x86_64_gnullvm";
packageId = "windows_x86_64_gnullvm 0.52.0"; packageId = "windows_x86_64_gnullvm 0.52.0";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-gnullvm"); target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "x86_64-pc-windows-gnullvm");
} }
{ {
name = "windows_x86_64_msvc"; name = "windows_x86_64_msvc";
@ -8137,14 +8178,11 @@ rec {
fuchsia = true; fuchsia = true;
test = false; test = false;
/* We are choosing an arbitrary rust version to grab `lib` from, inherit (platform.rust.platform)
which is unfortunate, but `lib` has been version-agnostic the arch
whole time so this is good enough for now. os
*/ vendor;
os = pkgs.rust.lib.toTargetOs platform; family = platform.rust.platform.target-family;
arch = pkgs.rust.lib.toTargetArch platform;
family = pkgs.rust.lib.toTargetFamily platform;
vendor = pkgs.rust.lib.toTargetVendor platform;
env = "gnu"; env = "gnu";
endian = endian =
if platform.parsed.cpu.significantByte.name == "littleEndian" if platform.parsed.cpu.significantByte.name == "littleEndian"
@ -8221,6 +8259,7 @@ rec {
( (
_: { _: {
buildTests = true; buildTests = true;
release = false;
} }
); );
# If the user hasn't set any pre/post commands, we don't want to # If the user hasn't set any pre/post commands, we don't want to
@ -8250,8 +8289,9 @@ rec {
# because we compiled those test binaries in the former and not the latter. # 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. # 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. # 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` # NOTE: There could be edge cases if `crate.sourceRoot` does exist but
# do exist but it's very hard to reason about them, so let's wait until the first bug report. # it's very hard to reason about them.
# Open a bug if you run into this!
mkdir -p source/ mkdir -p source/
cd source/ cd source/
@ -8386,7 +8426,7 @@ rec {
let let
self = { self = {
crates = lib.mapAttrs (packageId: value: buildByPackageIdForPkgsImpl self pkgs packageId) crateConfigs; crates = lib.mapAttrs (packageId: value: buildByPackageIdForPkgsImpl self pkgs packageId) crateConfigs;
target = makeTarget pkgs.stdenv.hostPlatform; target = makeTarget stdenv.hostPlatform;
build = mkBuiltByPackageIdByPkgs pkgs.buildPackages; build = mkBuiltByPackageIdByPkgs pkgs.buildPackages;
}; };
in in
@ -8461,8 +8501,6 @@ rec {
buildRustCrateForPkgsFunc pkgs buildRustCrateForPkgsFunc pkgs
( (
crateConfig // { crateConfig // {
# https://github.com/NixOS/nixpkgs/issues/218712
dontStrip = stdenv.hostPlatform.isDarwin;
src = crateConfig.src or ( src = crateConfig.src or (
pkgs.fetchurl rec { pkgs.fetchurl rec {
name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz"; name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz";

View file

@ -1,3 +1,9 @@
{ pkgs, ... }: { pkgs, depot, ... }:
(pkgs.callPackage ./Cargo.nix { }).rootCrate.build (pkgs.callPackage ./Cargo.nix {
defaultCrateOverrides = (depot.tvix.utils.defaultCrateOverridesForPkgs pkgs) // {
weave = prev: {
src = depot.tvix.utils.filterRustCrateSrc { root = prev.src.origSrc; };
};
};
}).rootCrate.build