about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-12-16T11·54+0300
committertazjin <tazjin@tvl.su>2022-12-21T13·23+0000
commit257c67f204c2a2d1ca8a1d0ac266312167a170eb (patch)
tree2cd7f15cb4f47a0083c273ab1b0b7ff8f9a5f688
parentd9e2bec953880ecb5953b61b36a5beaec0565e22 (diff)
chore(tvix): upgrade to clap 4.0 r/5441
In //tvix/eval:

* criterion bumped to 4.0, which at least depends on clap 3.x instead
  of 2.x, which is less incompatible

In //tvix/cli:

* no changes required

In //tvix/nix_cli:

* some minor changes for compatibility with clap 4.0, no functionality
  changes

Change-Id: If793f64b59fcaa2402d3d483ddbab4092f32df03
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7588
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
-rw-r--r--tvix/Cargo.lock174
-rw-r--r--tvix/Cargo.nix729
-rw-r--r--tvix/cli/Cargo.toml2
-rw-r--r--tvix/eval/Cargo.toml2
-rw-r--r--tvix/eval/benches/eval.rs5
-rw-r--r--tvix/nix_cli/Cargo.toml3
-rw-r--r--tvix/nix_cli/src/bin/nix-store.rs8
7 files changed, 478 insertions, 445 deletions
diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock
index 7dcf6c78f8..bc683b015c 100644
--- a/tvix/Cargo.lock
+++ b/tvix/Cargo.lock
@@ -27,6 +27,12 @@ dependencies = [
 ]
 
 [[package]]
+name = "anes"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+
+[[package]]
 name = "anyhow"
 version = "1.0.66"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -50,7 +56,7 @@ version = "0.2.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
 dependencies = [
- "hermit-abi",
+ "hermit-abi 0.1.19",
  "libc",
  "winapi",
 ]
@@ -118,18 +124,6 @@ dependencies = [
 ]
 
 [[package]]
-name = "bstr"
-version = "0.2.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
-dependencies = [
- "lazy_static",
- "memchr",
- "regex-automata",
- "serde",
-]
-
-[[package]]
 name = "bumpalo"
 version = "3.11.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -166,14 +160,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
 [[package]]
-name = "clap"
-version = "2.34.0"
+name = "ciborium"
+version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
+checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f"
 dependencies = [
- "bitflags",
- "textwrap 0.11.0",
- "unicode-width",
+ "ciborium-io",
+ "ciborium-ll",
+ "serde",
+]
+
+[[package]]
+name = "ciborium-io"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369"
+
+[[package]]
+name = "ciborium-ll"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b"
+dependencies = [
+ "ciborium-io",
+ "half",
 ]
 
 [[package]]
@@ -182,22 +192,32 @@ version = "3.2.23"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
 dependencies = [
- "atty",
  "bitflags",
- "clap_derive",
- "clap_lex",
+ "clap_lex 0.2.4",
  "indexmap",
+ "textwrap",
+]
+
+[[package]]
+name = "clap"
+version = "4.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0acbd8d28a0a60d7108d7ae850af6ba34cf2d1257fc646980e5f97ce14275966"
+dependencies = [
+ "bitflags",
+ "clap_derive",
+ "clap_lex 0.3.0",
+ "is-terminal",
  "once_cell",
  "strsim",
  "termcolor",
- "textwrap 0.16.0",
 ]
 
 [[package]]
 name = "clap_derive"
-version = "3.2.18"
+version = "4.0.21"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
+checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014"
 dependencies = [
  "heck",
  "proc-macro-error",
@@ -216,6 +236,15 @@ dependencies = [
 ]
 
 [[package]]
+name = "clap_lex"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8"
+dependencies = [
+ "os_str_bytes",
+]
+
+[[package]]
 name = "clipboard-win"
 version = "4.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -257,15 +286,16 @@ checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636"
 
 [[package]]
 name = "criterion"
-version = "0.3.6"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f"
+checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb"
 dependencies = [
+ "anes",
  "atty",
  "cast",
- "clap 2.34.0",
+ "ciborium",
+ "clap 3.2.23",
  "criterion-plot",
- "csv",
  "itertools",
  "lazy_static",
  "num-traits",
@@ -274,7 +304,6 @@ dependencies = [
  "rayon",
  "regex",
  "serde",
- "serde_cbor",
  "serde_derive",
  "serde_json",
  "tinytemplate",
@@ -283,9 +312,9 @@ dependencies = [
 
 [[package]]
 name = "criterion-plot"
-version = "0.4.5"
+version = "0.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876"
+checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
 dependencies = [
  "cast",
  "itertools",
@@ -345,28 +374,6 @@ dependencies = [
 ]
 
 [[package]]
-name = "csv"
-version = "1.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1"
-dependencies = [
- "bstr",
- "csv-core",
- "itoa 0.4.8",
- "ryu",
- "serde",
-]
-
-[[package]]
-name = "csv-core"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
-dependencies = [
- "memchr",
-]
-
-[[package]]
 name = "ctor"
 version = "0.1.26"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -570,6 +577,15 @@ dependencies = [
 ]
 
 [[package]]
+name = "hermit-abi"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
+dependencies = [
+ "libc",
+]
+
+[[package]]
 name = "indexmap"
 version = "1.9.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -599,6 +615,18 @@ dependencies = [
 ]
 
 [[package]]
+name = "is-terminal"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aae5bc6e2eb41c9def29a3e0f1306382807764b9b53112030eff57435667352d"
+dependencies = [
+ "hermit-abi 0.2.6",
+ "io-lifetimes",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
 name = "itertools"
 version = "0.10.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -609,12 +637,6 @@ dependencies = [
 
 [[package]]
 name = "itoa"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
-
-[[package]]
-name = "itoa"
 version = "1.0.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
@@ -731,7 +753,7 @@ dependencies = [
 name = "nix-cli"
 version = "0.1.0"
 dependencies = [
- "clap 3.2.23",
+ "clap 4.0.27",
  "tempfile",
 ]
 
@@ -750,7 +772,7 @@ version = "1.14.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5"
 dependencies = [
- "hermit-abi",
+ "hermit-abi 0.1.19",
  "libc",
 ]
 
@@ -1142,12 +1164,6 @@ dependencies = [
 ]
 
 [[package]]
-name = "regex-automata"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
-
-[[package]]
 name = "regex-syntax"
 version = "0.6.28"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1259,15 +1275,8 @@ name = "serde"
 version = "1.0.147"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965"
-
-[[package]]
-name = "serde_cbor"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
 dependencies = [
- "half",
- "serde",
+ "serde_derive",
 ]
 
 [[package]]
@@ -1287,7 +1296,7 @@ version = "1.0.89"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db"
 dependencies = [
- "itoa 1.0.4",
+ "itoa",
  "ryu",
  "serde",
 ]
@@ -1444,15 +1453,6 @@ checksum = "288cb548dbe72b652243ea797201f3d481a0609a967980fcc5b2315ea811560a"
 
 [[package]]
 name = "textwrap"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
-dependencies = [
- "unicode-width",
-]
-
-[[package]]
-name = "textwrap"
 version = "0.16.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
@@ -1491,7 +1491,7 @@ dependencies = [
 name = "tvix-cli"
 version = "0.1.0"
 dependencies = [
- "clap 3.2.23",
+ "clap 4.0.27",
  "dirs",
  "rustyline",
  "tvix-eval",
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix
index 599da81085..d670bda408 100644
--- a/tvix/Cargo.nix
+++ b/tvix/Cargo.nix
@@ -6,11 +6,7 @@
 , pkgs ? import nixpkgs { config = { }; }
 , lib ? pkgs.lib
 , stdenv ? pkgs.stdenv
-, buildRustCrateForPkgs ? if buildRustCrate != null
-  then lib.warn "crate2nix: Passing `buildRustCrate` as argument to Cargo.nix is deprecated. If you don't customize `buildRustCrate`, replace `callPackage ./Cargo.nix {}` by `import ./Cargo.nix { inherit pkgs; }`, and if you need to customize `buildRustCrate`, use `buildRustCrateForPkgs` instead." (_: buildRustCrate)
-  else pkgs: pkgs.buildRustCrate
-  # Deprecated
-, buildRustCrate ? null
+, buildRustCrateForPkgs ? pkgs: pkgs.buildRustCrate
   # This is used as the `crateOverrides` argument for `buildRustCrate`.
 , defaultCrateOverrides ? pkgs.defaultCrateOverrides
   # The features to enable for the root_crate or the workspace_members.
@@ -178,6 +174,20 @@ rec {
         };
         resolvedDefaultFeatures = [ "default" "std" ];
       };
+      "anes" = rec {
+        crateName = "anes";
+        version = "0.1.6";
+        edition = "2018";
+        sha256 = "16bj1ww1xkwzbckk32j2pnbn5vk6wgsl3q4p3j9551xbcarwnijb";
+        authors = [
+          "Robert Vojta <rvojta@me.com>"
+        ];
+        features = {
+          "bitflags" = [ "dep:bitflags" ];
+          "parser" = [ "bitflags" ];
+        };
+        resolvedDefaultFeatures = [ "default" ];
+      };
       "anyhow" = rec {
         crateName = "anyhow";
         version = "1.0.66";
@@ -226,8 +236,8 @@ rec {
         dependencies = [
           {
             name = "hermit-abi";
-            packageId = "hermit-abi";
-            target = { target, features }: (target."os" == "hermit");
+            packageId = "hermit-abi 0.1.19";
+            target = { target, features }: ("hermit" == target."os");
           }
           {
             name = "libc";
@@ -420,50 +430,6 @@ rec {
         ];
 
       };
-      "bstr" = rec {
-        crateName = "bstr";
-        version = "0.2.17";
-        edition = "2018";
-        sha256 = "08rjbhysy6gg27db2h3pnhvr2mlr5vkj797i9625kwg8hgrnjdds";
-        authors = [
-          "Andrew Gallant <jamslam@gmail.com>"
-        ];
-        dependencies = [
-          {
-            name = "lazy_static";
-            packageId = "lazy_static";
-            optional = true;
-          }
-          {
-            name = "memchr";
-            packageId = "memchr";
-            usesDefaultFeatures = false;
-          }
-          {
-            name = "regex-automata";
-            packageId = "regex-automata";
-            optional = true;
-            usesDefaultFeatures = false;
-          }
-          {
-            name = "serde";
-            packageId = "serde";
-            optional = true;
-            usesDefaultFeatures = false;
-          }
-        ];
-        features = {
-          "default" = [ "std" "unicode" ];
-          "lazy_static" = [ "dep:lazy_static" ];
-          "regex-automata" = [ "dep:regex-automata" ];
-          "serde" = [ "dep:serde" ];
-          "serde1" = [ "std" "serde1-nostd" "serde/std" ];
-          "serde1-nostd" = [ "serde" ];
-          "std" = [ "memchr/std" ];
-          "unicode" = [ "lazy_static" "regex-automata" ];
-        };
-        resolvedDefaultFeatures = [ "default" "lazy_static" "regex-automata" "serde" "serde1" "serde1-nostd" "std" "unicode" ];
-      };
       "bumpalo" = rec {
         crateName = "bumpalo";
         version = "3.11.1";
@@ -540,42 +506,70 @@ rec {
           "rustc-dep-of-std" = [ "core" "compiler_builtins" ];
         };
       };
-      "clap 2.34.0" = rec {
-        crateName = "clap";
-        version = "2.34.0";
-        edition = "2018";
-        sha256 = "071q5d8jfwbazi6zhik9xwpacx5i6kb2vkzy060vhf0c3120aqd0";
+      "ciborium" = rec {
+        crateName = "ciborium";
+        version = "0.2.0";
+        edition = "2021";
+        sha256 = "13vqkm88kaq8nvxhaj6qsl0gsc16rqsin014fx5902y6iib3ghdh";
         authors = [
-          "Kevin K. <kbknapp@gmail.com>"
+          "Nathaniel McCallum <npmccallum@profian.com>"
         ];
         dependencies = [
           {
-            name = "bitflags";
-            packageId = "bitflags";
+            name = "ciborium-io";
+            packageId = "ciborium-io";
+            features = [ "alloc" ];
           }
           {
-            name = "textwrap";
-            packageId = "textwrap 0.11.0";
+            name = "ciborium-ll";
+            packageId = "ciborium-ll";
           }
           {
-            name = "unicode-width";
-            packageId = "unicode-width";
+            name = "serde";
+            packageId = "serde";
+            usesDefaultFeatures = false;
+            features = [ "alloc" "derive" ];
           }
         ];
         features = {
-          "ansi_term" = [ "dep:ansi_term" ];
-          "atty" = [ "dep:atty" ];
-          "clippy" = [ "dep:clippy" ];
-          "color" = [ "ansi_term" "atty" ];
-          "default" = [ "suggestions" "color" "vec_map" ];
-          "doc" = [ "yaml" ];
-          "strsim" = [ "dep:strsim" ];
-          "suggestions" = [ "strsim" ];
-          "term_size" = [ "dep:term_size" ];
-          "vec_map" = [ "dep:vec_map" ];
-          "wrap_help" = [ "term_size" "textwrap/term_size" ];
-          "yaml" = [ "yaml-rust" ];
-          "yaml-rust" = [ "dep:yaml-rust" ];
+          "default" = [ "std" ];
+          "std" = [ "ciborium-io/std" "serde/std" ];
+        };
+        resolvedDefaultFeatures = [ "default" "std" ];
+      };
+      "ciborium-io" = rec {
+        crateName = "ciborium-io";
+        version = "0.2.0";
+        edition = "2021";
+        sha256 = "0sdkk7l7pqi2nsbm9c6g8im1gb1qdd83l25ja9xwhg07mx9yfv9l";
+        authors = [
+          "Nathaniel McCallum <npmccallum@profian.com>"
+        ];
+        features = {
+          "std" = [ "alloc" ];
+        };
+        resolvedDefaultFeatures = [ "alloc" "std" ];
+      };
+      "ciborium-ll" = rec {
+        crateName = "ciborium-ll";
+        version = "0.2.0";
+        edition = "2021";
+        sha256 = "06ygqh33k3hp9r9mma43gf189b6cyq62clk65f4w1q54nni30c11";
+        authors = [
+          "Nathaniel McCallum <npmccallum@profian.com>"
+        ];
+        dependencies = [
+          {
+            name = "ciborium-io";
+            packageId = "ciborium-io";
+          }
+          {
+            name = "half";
+            packageId = "half";
+          }
+        ];
+        features = {
+          "std" = [ "alloc" ];
         };
       };
       "clap 3.2.23" = rec {
@@ -586,45 +580,20 @@ rec {
         sha256 = "19bkwkj49ha7mlip0gxsqb9xmd3jpr7ghvcx1hkx6icqrd2mqrbi";
         dependencies = [
           {
-            name = "atty";
-            packageId = "atty";
-            optional = true;
-          }
-          {
             name = "bitflags";
             packageId = "bitflags";
           }
           {
-            name = "clap_derive";
-            packageId = "clap_derive";
-            optional = true;
-          }
-          {
             name = "clap_lex";
-            packageId = "clap_lex";
+            packageId = "clap_lex 0.2.4";
           }
           {
             name = "indexmap";
             packageId = "indexmap";
           }
           {
-            name = "once_cell";
-            packageId = "once_cell";
-            optional = true;
-          }
-          {
-            name = "strsim";
-            packageId = "strsim";
-            optional = true;
-          }
-          {
-            name = "termcolor";
-            packageId = "termcolor";
-            optional = true;
-          }
-          {
             name = "textwrap";
-            packageId = "textwrap 0.16.0";
+            packageId = "textwrap";
             usesDefaultFeatures = false;
           }
         ];
@@ -653,13 +622,69 @@ rec {
           "yaml" = [ "yaml-rust" ];
           "yaml-rust" = [ "dep:yaml-rust" ];
         };
-        resolvedDefaultFeatures = [ "atty" "clap_derive" "color" "default" "derive" "env" "once_cell" "std" "strsim" "suggestions" "termcolor" ];
+        resolvedDefaultFeatures = [ "std" ];
+      };
+      "clap 4.0.27" = rec {
+        crateName = "clap";
+        version = "4.0.27";
+        edition = "2021";
+        crateBin = [ ];
+        sha256 = "0rjr4wacx5sz1sc4dikz4p8z4k53dfpm1s3sil8dfq0aib9dijqa";
+        dependencies = [
+          {
+            name = "bitflags";
+            packageId = "bitflags";
+          }
+          {
+            name = "clap_derive";
+            packageId = "clap_derive";
+            optional = true;
+          }
+          {
+            name = "clap_lex";
+            packageId = "clap_lex 0.3.0";
+          }
+          {
+            name = "is-terminal";
+            packageId = "is-terminal";
+            optional = true;
+          }
+          {
+            name = "once_cell";
+            packageId = "once_cell";
+            optional = true;
+          }
+          {
+            name = "strsim";
+            packageId = "strsim";
+            optional = true;
+          }
+          {
+            name = "termcolor";
+            packageId = "termcolor";
+            optional = true;
+          }
+        ];
+        features = {
+          "cargo" = [ "dep:once_cell" ];
+          "color" = [ "dep:is-terminal" "dep:termcolor" ];
+          "debug" = [ "clap_derive?/debug" "dep:backtrace" ];
+          "default" = [ "std" "color" "help" "usage" "error-context" "suggestions" ];
+          "deprecated" = [ "clap_derive?/deprecated" ];
+          "derive" = [ "dep:clap_derive" "dep:once_cell" ];
+          "suggestions" = [ "dep:strsim" "error-context" ];
+          "unicode" = [ "dep:unicode-width" "dep:unicase" ];
+          "unstable-doc" = [ "derive" "cargo" "wrap_help" "env" "unicode" "string" "unstable-replace" "unstable-grouped" ];
+          "unstable-v5" = [ "clap_derive?/unstable-v5" "deprecated" ];
+          "wrap_help" = [ "help" "dep:terminal_size" ];
+        };
+        resolvedDefaultFeatures = [ "color" "default" "derive" "env" "error-context" "help" "std" "suggestions" "usage" ];
       };
       "clap_derive" = rec {
         crateName = "clap_derive";
-        version = "3.2.18";
+        version = "4.0.21";
         edition = "2021";
-        sha256 = "0r9az0cl33xx0i9g18l56l3vd5ayjvcflvza2gdf8jwcab78n37a";
+        sha256 = "054h5c62jy5c5li58696ymly0avyjvcbn1krcaawkbq2kwzk2xq1";
         procMacro = true;
         dependencies = [
           {
@@ -686,11 +711,11 @@ rec {
         ];
         features = {
           "raw-deprecated" = [ "deprecated" ];
-          "unstable-v4" = [ "deprecated" ];
+          "unstable-v5" = [ "deprecated" ];
         };
         resolvedDefaultFeatures = [ "default" ];
       };
-      "clap_lex" = rec {
+      "clap_lex 0.2.4" = rec {
         crateName = "clap_lex";
         version = "0.2.4";
         edition = "2021";
@@ -705,6 +730,21 @@ rec {
         ];
 
       };
+      "clap_lex 0.3.0" = rec {
+        crateName = "clap_lex";
+        version = "0.3.0";
+        edition = "2021";
+        sha256 = "1a4dzbnlxiamfsn0pnkhn7n9bdfjh66j9fxm6mmr7d227vvrhh8d";
+        dependencies = [
+          {
+            name = "os_str_bytes";
+            packageId = "os_str_bytes";
+            usesDefaultFeatures = false;
+            features = [ "raw_os_str" ];
+          }
+        ];
+
+      };
       "clipboard-win" = rec {
         crateName = "clipboard-win";
         version = "4.4.2";
@@ -799,15 +839,19 @@ rec {
       };
       "criterion" = rec {
         crateName = "criterion";
-        version = "0.3.6";
+        version = "0.4.0";
         edition = "2018";
-        sha256 = "13yd64ah93gkbdv7qq4cr6rhgl9979jjcjk3gkhnav1b7glns7dh";
+        sha256 = "1jsl4r0yc3fpkyjbi8aa1jrm69apqq9rxwnjnd9brqmaq44nxiz7";
         authors = [
           "Jorge Aparicio <japaricious@gmail.com>"
           "Brook Heisler <brookheisler@gmail.com>"
         ];
         dependencies = [
           {
+            name = "anes";
+            packageId = "anes";
+          }
+          {
             name = "atty";
             packageId = "atty";
           }
@@ -816,19 +860,20 @@ rec {
             packageId = "cast";
           }
           {
+            name = "ciborium";
+            packageId = "ciborium";
+          }
+          {
             name = "clap";
-            packageId = "clap 2.34.0";
+            packageId = "clap 3.2.23";
             usesDefaultFeatures = false;
+            features = [ "std" ];
           }
           {
             name = "criterion-plot";
             packageId = "criterion-plot";
           }
           {
-            name = "csv";
-            packageId = "csv";
-          }
-          {
             name = "itertools";
             packageId = "itertools";
           }
@@ -840,6 +885,7 @@ rec {
             name = "num-traits";
             packageId = "num-traits";
             usesDefaultFeatures = false;
+            features = [ "std" ];
           }
           {
             name = "oorandom";
@@ -848,12 +894,14 @@ rec {
           {
             name = "plotters";
             packageId = "plotters";
+            optional = true;
             usesDefaultFeatures = false;
             features = [ "svg_backend" "area_series" "line_series" ];
           }
           {
             name = "rayon";
             packageId = "rayon";
+            optional = true;
           }
           {
             name = "regex";
@@ -866,10 +914,6 @@ rec {
             packageId = "serde";
           }
           {
-            name = "serde_cbor";
-            packageId = "serde_cbor";
-          }
-          {
             name = "serde_derive";
             packageId = "serde_derive";
           }
@@ -893,19 +937,23 @@ rec {
           "async_smol" = [ "smol" "async" ];
           "async_std" = [ "async-std" "async" ];
           "async_tokio" = [ "tokio" "async" ];
-          "default" = [ "cargo_bench_support" ];
+          "csv" = [ "dep:csv" ];
+          "csv_output" = [ "csv" ];
+          "default" = [ "rayon" "plotters" "cargo_bench_support" ];
           "futures" = [ "dep:futures" ];
+          "plotters" = [ "dep:plotters" ];
+          "rayon" = [ "dep:rayon" ];
           "smol" = [ "dep:smol" ];
-          "stable" = [ "async_futures" "async_smol" "async_tokio" "async_std" ];
+          "stable" = [ "csv_output" "html_reports" "async_futures" "async_smol" "async_tokio" "async_std" ];
           "tokio" = [ "dep:tokio" ];
         };
-        resolvedDefaultFeatures = [ "cargo_bench_support" "default" ];
+        resolvedDefaultFeatures = [ "cargo_bench_support" "default" "plotters" "rayon" ];
       };
       "criterion-plot" = rec {
         crateName = "criterion-plot";
-        version = "0.4.5";
+        version = "0.5.0";
         edition = "2018";
-        sha256 = "0xhq0jz1603585h7xvm3s4x9irmifjliklszbzs4cda00y1cqwr6";
+        sha256 = "1c866xkjqqhzg4cjvg01f8w6xc1j3j7s58rdksl52skq89iq4l3b";
         authors = [
           "Jorge Aparicio <japaricious@gmail.com>"
           "Brook Heisler <brookheisler@gmail.com>"
@@ -1059,66 +1107,6 @@ rec {
         };
         resolvedDefaultFeatures = [ "std" ];
       };
-      "csv" = rec {
-        crateName = "csv";
-        version = "1.1.6";
-        edition = "2018";
-        sha256 = "1q9nqn0qlamwl18v57p82c8yhxy43lkzf2z1mndmycsvqinkm092";
-        authors = [
-          "Andrew Gallant <jamslam@gmail.com>"
-        ];
-        dependencies = [
-          {
-            name = "bstr";
-            packageId = "bstr";
-            features = [ "serde1" ];
-          }
-          {
-            name = "csv-core";
-            packageId = "csv-core";
-          }
-          {
-            name = "itoa";
-            packageId = "itoa 0.4.8";
-          }
-          {
-            name = "ryu";
-            packageId = "ryu";
-          }
-          {
-            name = "serde";
-            packageId = "serde";
-          }
-        ];
-        devDependencies = [
-          {
-            name = "serde";
-            packageId = "serde";
-            features = [ "derive" ];
-          }
-        ];
-
-      };
-      "csv-core" = rec {
-        crateName = "csv-core";
-        version = "0.1.10";
-        edition = "2018";
-        sha256 = "145wcc3560v1kmysqqspvddppiysr2rifqzy4nnlh3r6kxanc91b";
-        authors = [
-          "Andrew Gallant <jamslam@gmail.com>"
-        ];
-        dependencies = [
-          {
-            name = "memchr";
-            packageId = "memchr";
-            usesDefaultFeatures = false;
-          }
-        ];
-        features = {
-          "libc" = [ "memchr/libc" ];
-        };
-        resolvedDefaultFeatures = [ "default" ];
-      };
       "ctor" = rec {
         crateName = "ctor";
         version = "0.1.26";
@@ -1246,7 +1234,7 @@ rec {
             name = "redox_users";
             packageId = "redox_users";
             usesDefaultFeatures = false;
-            target = { target, features }: (target."os" == "redox");
+            target = { target, features }: ("redox" == target."os");
           }
           {
             name = "winapi";
@@ -1275,7 +1263,7 @@ rec {
             name = "redox_users";
             packageId = "redox_users";
             usesDefaultFeatures = false;
-            target = { target, features }: (target."os" == "redox");
+            target = { target, features }: ("redox" == target."os");
           }
           {
             name = "winapi";
@@ -1322,17 +1310,17 @@ rec {
           {
             name = "errno-dragonfly";
             packageId = "errno-dragonfly";
-            target = { target, features }: (target."os" == "dragonfly");
+            target = { target, features }: ("dragonfly" == target."os");
           }
           {
             name = "libc";
             packageId = "libc";
-            target = { target, features }: (target."os" == "hermit");
+            target = { target, features }: ("hermit" == target."os");
           }
           {
             name = "libc";
             packageId = "libc";
-            target = { target, features }: (target."os" == "wasi");
+            target = { target, features }: ("wasi" == target."os");
           }
           {
             name = "libc";
@@ -1406,14 +1394,14 @@ rec {
           {
             name = "instant";
             packageId = "instant";
-            target = { target, features }: (target."arch" == "wasm32");
+            target = { target, features }: ("wasm32" == target."arch");
           }
         ];
         devDependencies = [
           {
             name = "instant";
             packageId = "instant";
-            target = { target, features }: (target."arch" == "wasm32");
+            target = { target, features }: ("wasm32" == target."arch");
             features = [ "wasm-bindgen" ];
           }
         ];
@@ -1520,7 +1508,7 @@ rec {
           {
             name = "wasi";
             packageId = "wasi";
-            target = { target, features }: (target."os" == "wasi");
+            target = { target, features }: ("wasi" == target."os");
           }
         ];
         features = {
@@ -1617,7 +1605,7 @@ rec {
         };
         resolvedDefaultFeatures = [ "default" ];
       };
-      "hermit-abi" = rec {
+      "hermit-abi 0.1.19" = rec {
         crateName = "hermit-abi";
         version = "0.1.19";
         edition = "2018";
@@ -1639,6 +1627,29 @@ rec {
         };
         resolvedDefaultFeatures = [ "default" ];
       };
+      "hermit-abi 0.2.6" = rec {
+        crateName = "hermit-abi";
+        version = "0.2.6";
+        edition = "2021";
+        sha256 = "1iz439yz9qzk3rh9pqx2rz5c4107v3qbd7bppfsbzb1mzr02clgf";
+        authors = [
+          "Stefan Lankes"
+        ];
+        dependencies = [
+          {
+            name = "libc";
+            packageId = "libc";
+            usesDefaultFeatures = false;
+          }
+        ];
+        features = {
+          "alloc" = [ "dep:alloc" ];
+          "compiler_builtins" = [ "dep:compiler_builtins" ];
+          "core" = [ "dep:core" ];
+          "rustc-dep-of-std" = [ "core" "alloc" "compiler_builtins/rustc-dep-of-std" "libc/rustc-dep-of-std" ];
+        };
+        resolvedDefaultFeatures = [ "default" ];
+      };
       "indexmap" = rec {
         crateName = "indexmap";
         version = "1.9.2";
@@ -1725,7 +1736,41 @@ rec {
           "tokio" = [ "dep:tokio" ];
           "windows-sys" = [ "dep:windows-sys" ];
         };
-        resolvedDefaultFeatures = [ "close" "libc" "windows-sys" ];
+        resolvedDefaultFeatures = [ "close" "default" "libc" "windows-sys" ];
+      };
+      "is-terminal" = rec {
+        crateName = "is-terminal";
+        version = "0.4.0";
+        edition = "2018";
+        sha256 = "0b9mcxb46mzz1q1i4cdmp5j7g042ccqg3q5357prs75l5rpbrrda";
+        authors = [
+          "softprops <d.tangren@gmail.com>"
+          "Dan Gohman <dev@sunfishcode.online>"
+        ];
+        dependencies = [
+          {
+            name = "hermit-abi";
+            packageId = "hermit-abi 0.2.6";
+            target = { target, features }: ("hermit" == target."os");
+          }
+          {
+            name = "io-lifetimes";
+            packageId = "io-lifetimes";
+          }
+          {
+            name = "rustix";
+            packageId = "rustix";
+            target = { target, features }: (!((target."windows" or false) || ("hermit" == target."os")));
+            features = [ "termios" ];
+          }
+          {
+            name = "windows-sys";
+            packageId = "windows-sys";
+            target = { target, features }: (target."windows" or false);
+            features = [ "Win32_Foundation" "Win32_System_Console" ];
+          }
+        ];
+
       };
       "itertools" = rec {
         crateName = "itertools";
@@ -1748,20 +1793,7 @@ rec {
         };
         resolvedDefaultFeatures = [ "default" "use_alloc" "use_std" ];
       };
-      "itoa 0.4.8" = rec {
-        crateName = "itoa";
-        version = "0.4.8";
-        edition = "2015";
-        sha256 = "1m1dairwyx8kfxi7ab3b5jc71z1vigh9w4shnhiajji9avzr26dp";
-        authors = [
-          "David Tolnay <dtolnay@gmail.com>"
-        ];
-        features = {
-          "default" = [ "std" ];
-        };
-        resolvedDefaultFeatures = [ "default" "std" ];
-      };
-      "itoa 1.0.4" = rec {
+      "itoa" = rec {
         crateName = "itoa";
         version = "1.0.4";
         edition = "2018";
@@ -1991,14 +2023,14 @@ rec {
           {
             name = "memoffset";
             packageId = "memoffset 0.6.5";
-            target = { target, features }: (!(target."os" == "redox"));
+            target = { target, features }: (!("redox" == target."os"));
           }
         ];
         buildDependencies = [
           {
             name = "cc";
             packageId = "cc";
-            target = { target, features }: (target."os" == "dragonfly");
+            target = { target, features }: ("dragonfly" == target."os");
           }
         ];
 
@@ -2048,14 +2080,27 @@ rec {
         version = "0.1.0";
         edition = "2021";
         crateBin = [
-          { name = "nix-store"; path = "src/bin/nix-store.rs"; }
-          { name = "nix-cli"; path = "src/main.rs"; }
+          {
+            name = "nix-cli";
+            path = "src/main.rs";
+            requiredFeatures = [ ];
+          }
+          {
+            name = "nix-store";
+            path = "src/bin/nix-store.rs";
+            requiredFeatures = [ ];
+          }
         ];
-        src = lib.cleanSourceWith { filter = sourceFilter; src = ./nix_cli; };
+        # We can't filter paths with references in Nix 2.4
+        # See https://github.com/NixOS/nix/issues/5410
+        src =
+          if (lib.versionOlder builtins.nixVersion "2.4pre20211007")
+          then lib.cleanSourceWith { filter = sourceFilter; src = ./nix_cli; }
+          else ./nix_cli;
         dependencies = [
           {
             name = "clap";
-            packageId = "clap 3.2.23";
+            packageId = "clap 4.0.27";
           }
           {
             name = "tempfile";
@@ -2096,8 +2141,8 @@ rec {
         dependencies = [
           {
             name = "hermit-abi";
-            packageId = "hermit-abi";
-            target = { target, features }: (((target."arch" == "x86_64") || (target."arch" == "aarch64")) && (target."os" == "hermit"));
+            packageId = "hermit-abi 0.1.19";
+            target = { target, features }: ((("x86_64" == target."arch") || ("aarch64" == target."arch")) && ("hermit" == target."os"));
           }
           {
             name = "libc";
@@ -2272,12 +2317,12 @@ rec {
           {
             name = "wasm-bindgen";
             packageId = "wasm-bindgen";
-            target = { target, features }: ((target."arch" == "wasm32") && (!(target."os" == "wasi")));
+            target = { target, features }: (("wasm32" == target."arch") && (!("wasi" == target."os")));
           }
           {
             name = "web-sys";
             packageId = "web-sys";
-            target = { target, features }: ((target."arch" == "wasm32") && (!(target."os" == "wasi")));
+            target = { target, features }: (("wasm32" == target."arch") && (!("wasi" == target."os")));
             features = [ "Document" "DomRect" "Element" "HtmlElement" "Node" "Window" "HtmlCanvasElement" "CanvasRenderingContext2d" ];
           }
         ];
@@ -2866,7 +2911,7 @@ rec {
           {
             name = "fuchsia-cprng";
             packageId = "fuchsia-cprng";
-            target = { target, features }: (target."os" == "fuchsia");
+            target = { target, features }: ("fuchsia" == target."os");
           }
           {
             name = "libc";
@@ -2878,12 +2923,12 @@ rec {
             name = "rand_core";
             packageId = "rand_core 0.3.1";
             usesDefaultFeatures = false;
-            target = { target, features }: (target."env" == "sgx");
+            target = { target, features }: ("sgx" == target."env");
           }
           {
             name = "rdrand";
             packageId = "rdrand";
-            target = { target, features }: (target."env" == "sgx");
+            target = { target, features }: ("sgx" == target."env");
           }
           {
             name = "winapi";
@@ -3223,22 +3268,6 @@ rec {
         };
         resolvedDefaultFeatures = [ "aho-corasick" "default" "memchr" "perf" "perf-cache" "perf-dfa" "perf-inline" "perf-literal" "std" "unicode" "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ];
       };
-      "regex-automata" = rec {
-        crateName = "regex-automata";
-        version = "0.1.10";
-        edition = "2015";
-        sha256 = "0ci1hvbzhrfby5fdpf4ganhf7kla58acad9i1ff1p34dzdrhs8vc";
-        authors = [
-          "Andrew Gallant <jamslam@gmail.com>"
-        ];
-        features = {
-          "default" = [ "std" ];
-          "fst" = [ "dep:fst" ];
-          "regex-syntax" = [ "dep:regex-syntax" ];
-          "std" = [ "regex-syntax" ];
-          "transducer" = [ "std" "fst" ];
-        };
-      };
       "regex-syntax" = rec {
         crateName = "regex-syntax";
         version = "0.6.28";
@@ -3371,14 +3400,14 @@ rec {
             rename = "libc_errno";
             optional = true;
             usesDefaultFeatures = false;
-            target = { target, features }: ((!(target."rustix_use_libc" or false)) && (!(target."miri" or false)) && (target."os" == "linux") && ((target."arch" == "x86") || ((target."arch" == "x86_64") && (target."pointer_width" == "64")) || ((target."endian" == "little") && ((target."arch" == "arm") || ((target."arch" == "aarch64") && (target."pointer_width" == "64")) || (target."arch" == "powerpc64") || (target."arch" == "riscv64") || (target."arch" == "mips") || (target."arch" == "mips64")))));
+            target = { target, features }: ((!(target."rustix_use_libc" or false)) && (!(target."miri" or false)) && ("linux" == target."os") && (("x86" == target."arch") || (("x86_64" == target."arch") && ("64" == target."pointer_width")) || (("little" == target."endian") && (("arm" == target."arch") || (("aarch64" == target."arch") && ("64" == target."pointer_width")) || ("powerpc64" == target."arch") || ("riscv64" == target."arch") || ("mips" == target."arch") || ("mips64" == target."arch")))));
           }
           {
             name = "errno";
             packageId = "errno";
             rename = "libc_errno";
             usesDefaultFeatures = false;
-            target = { target, features }: ((target."rustix_use_libc" or false) || (target."miri" or false) || (!((target."os" == "linux") && ((target."arch" == "x86") || ((target."arch" == "x86_64") && (target."pointer_width" == "64")) || ((target."endian" == "little") && ((target."arch" == "arm") || ((target."arch" == "aarch64") && (target."pointer_width" == "64")) || (target."arch" == "powerpc64") || (target."arch" == "riscv64") || (target."arch" == "mips") || (target."arch" == "mips64")))))));
+            target = { target, features }: ((target."rustix_use_libc" or false) || (target."miri" or false) || (!(("linux" == target."os") && (("x86" == target."arch") || (("x86_64" == target."arch") && ("64" == target."pointer_width")) || (("little" == target."endian") && (("arm" == target."arch") || (("aarch64" == target."arch") && ("64" == target."pointer_width")) || ("powerpc64" == target."arch") || ("riscv64" == target."arch") || ("mips" == target."arch") || ("mips64" == target."arch")))))));
           }
           {
             name = "io-lifetimes";
@@ -3391,27 +3420,27 @@ rec {
             name = "libc";
             packageId = "libc";
             optional = true;
-            target = { target, features }: ((!(target."rustix_use_libc" or false)) && (!(target."miri" or false)) && (target."os" == "linux") && ((target."arch" == "x86") || ((target."arch" == "x86_64") && (target."pointer_width" == "64")) || ((target."endian" == "little") && ((target."arch" == "arm") || ((target."arch" == "aarch64") && (target."pointer_width" == "64")) || (target."arch" == "powerpc64") || (target."arch" == "riscv64") || (target."arch" == "mips") || (target."arch" == "mips64")))));
+            target = { target, features }: ((!(target."rustix_use_libc" or false)) && (!(target."miri" or false)) && ("linux" == target."os") && (("x86" == target."arch") || (("x86_64" == target."arch") && ("64" == target."pointer_width")) || (("little" == target."endian") && (("arm" == target."arch") || (("aarch64" == target."arch") && ("64" == target."pointer_width")) || ("powerpc64" == target."arch") || ("riscv64" == target."arch") || ("mips" == target."arch") || ("mips64" == target."arch")))));
             features = [ "extra_traits" ];
           }
           {
             name = "libc";
             packageId = "libc";
-            target = { target, features }: ((target."rustix_use_libc" or false) || (target."miri" or false) || (!((target."os" == "linux") && ((target."arch" == "x86") || ((target."arch" == "x86_64") && (target."pointer_width" == "64")) || ((target."endian" == "little") && ((target."arch" == "arm") || ((target."arch" == "aarch64") && (target."pointer_width" == "64")) || (target."arch" == "powerpc64") || (target."arch" == "riscv64") || (target."arch" == "mips") || (target."arch" == "mips64")))))));
+            target = { target, features }: ((target."rustix_use_libc" or false) || (target."miri" or false) || (!(("linux" == target."os") && (("x86" == target."arch") || (("x86_64" == target."arch") && ("64" == target."pointer_width")) || (("little" == target."endian") && (("arm" == target."arch") || (("aarch64" == target."arch") && ("64" == target."pointer_width")) || ("powerpc64" == target."arch") || ("riscv64" == target."arch") || ("mips" == target."arch") || ("mips64" == target."arch")))))));
             features = [ "extra_traits" ];
           }
           {
             name = "linux-raw-sys";
             packageId = "linux-raw-sys";
             usesDefaultFeatures = false;
-            target = { target, features }: (((target."os" == "android") || (target."os" == "linux")) && ((target."rustix_use_libc" or false) || (target."miri" or false) || (!((target."os" == "linux") && ((target."arch" == "x86") || ((target."arch" == "x86_64") && (target."pointer_width" == "64")) || ((target."endian" == "little") && ((target."arch" == "arm") || ((target."arch" == "aarch64") && (target."pointer_width" == "64")) || (target."arch" == "powerpc64") || (target."arch" == "riscv64") || (target."arch" == "mips") || (target."arch" == "mips64"))))))));
+            target = { target, features }: ((("android" == target."os") || ("linux" == target."os")) && ((target."rustix_use_libc" or false) || (target."miri" or false) || (!(("linux" == target."os") && (("x86" == target."arch") || (("x86_64" == target."arch") && ("64" == target."pointer_width")) || (("little" == target."endian") && (("arm" == target."arch") || (("aarch64" == target."arch") && ("64" == target."pointer_width")) || ("powerpc64" == target."arch") || ("riscv64" == target."arch") || ("mips" == target."arch") || ("mips64" == target."arch"))))))));
             features = [ "general" "no_std" ];
           }
           {
             name = "linux-raw-sys";
             packageId = "linux-raw-sys";
             usesDefaultFeatures = false;
-            target = { target, features }: ((!(target."rustix_use_libc" or false)) && (!(target."miri" or false)) && (target."os" == "linux") && ((target."arch" == "x86") || ((target."arch" == "x86_64") && (target."pointer_width" == "64")) || ((target."endian" == "little") && ((target."arch" == "arm") || ((target."arch" == "aarch64") && (target."pointer_width" == "64")) || (target."arch" == "powerpc64") || (target."arch" == "riscv64") || (target."arch" == "mips") || (target."arch" == "mips64")))));
+            target = { target, features }: ((!(target."rustix_use_libc" or false)) && (!(target."miri" or false)) && ("linux" == target."os") && (("x86" == target."arch") || (("x86_64" == target."arch") && ("64" == target."pointer_width")) || (("little" == target."endian") && (("arm" == target."arch") || (("aarch64" == target."arch") && ("64" == target."pointer_width")) || ("powerpc64" == target."arch") || ("riscv64" == target."arch") || ("mips" == target."arch") || ("mips64" == target."arch")))));
             features = [ "general" "errno" "ioctl" "no_std" ];
           }
           {
@@ -3425,6 +3454,7 @@ rec {
           {
             name = "errno";
             packageId = "errno";
+            rename = "libc_errno";
             usesDefaultFeatures = false;
           }
           {
@@ -3460,7 +3490,7 @@ rec {
           "use-libc" = [ "libc_errno" "libc" ];
           "use-libc-auxv" = [ "libc" ];
         };
-        resolvedDefaultFeatures = [ "default" "fs" "io-lifetimes" "libc" "std" "use-libc-auxv" ];
+        resolvedDefaultFeatures = [ "default" "fs" "io-lifetimes" "libc" "std" "termios" "use-libc-auxv" ];
       };
       "rustyline" = rec {
         crateName = "rustyline";
@@ -3607,39 +3637,25 @@ rec {
           "Erick Tryzelaar <erick.tryzelaar@gmail.com>"
           "David Tolnay <dtolnay@gmail.com>"
         ];
-        features = {
-          "default" = [ "std" ];
-          "derive" = [ "serde_derive" ];
-          "serde_derive" = [ "dep:serde_derive" ];
-        };
-        resolvedDefaultFeatures = [ "default" "std" ];
-      };
-      "serde_cbor" = rec {
-        crateName = "serde_cbor";
-        version = "0.11.2";
-        edition = "2018";
-        sha256 = "1xf1bq7ixha30914pd5jl3yw9v1x6car7xgrpimvfvs5vszjxvrb";
-        authors = [
-          "Pyfisch <pyfisch@posteo.org>"
-          "Steven Fackler <sfackler@gmail.com>"
-        ];
         dependencies = [
           {
-            name = "half";
-            packageId = "half";
+            name = "serde_derive";
+            packageId = "serde_derive";
+            optional = true;
           }
+        ];
+        devDependencies = [
           {
-            name = "serde";
-            packageId = "serde";
-            usesDefaultFeatures = false;
+            name = "serde_derive";
+            packageId = "serde_derive";
           }
         ];
         features = {
-          "alloc" = [ "serde/alloc" ];
           "default" = [ "std" ];
-          "std" = [ "serde/std" ];
+          "derive" = [ "serde_derive" ];
+          "serde_derive" = [ "dep:serde_derive" ];
         };
-        resolvedDefaultFeatures = [ "default" "std" ];
+        resolvedDefaultFeatures = [ "alloc" "default" "derive" "serde_derive" "std" ];
       };
       "serde_derive" = rec {
         crateName = "serde_derive";
@@ -3680,7 +3696,7 @@ rec {
         dependencies = [
           {
             name = "itoa";
-            packageId = "itoa 1.0.4";
+            packageId = "itoa";
           }
           {
             name = "ryu";
@@ -3979,12 +3995,12 @@ rec {
           {
             name = "libc";
             packageId = "libc";
-            target = { target, features }: ((target."unix" or false) || (target."os" == "wasi"));
+            target = { target, features }: ((target."unix" or false) || ("wasi" == target."os"));
           }
           {
             name = "redox_syscall";
             packageId = "redox_syscall";
-            target = { target, features }: (target."os" == "redox");
+            target = { target, features }: ("redox" == target."os");
           }
           {
             name = "remove_dir_all";
@@ -4089,26 +4105,7 @@ rec {
           "serde" = [ "dep:serde" ];
         };
       };
-      "textwrap 0.11.0" = rec {
-        crateName = "textwrap";
-        version = "0.11.0";
-        edition = "2015";
-        sha256 = "0q5hky03ik3y50s9sz25r438bc4nwhqc6dqwynv4wylc807n29nk";
-        authors = [
-          "Martin Geisler <martin@geisler.net>"
-        ];
-        dependencies = [
-          {
-            name = "unicode-width";
-            packageId = "unicode-width";
-          }
-        ];
-        features = {
-          "hyphenation" = [ "dep:hyphenation" ];
-          "term_size" = [ "dep:term_size" ];
-        };
-      };
-      "textwrap 0.16.0" = rec {
+      "textwrap" = rec {
         crateName = "textwrap";
         version = "0.16.0";
         edition = "2021";
@@ -4191,13 +4188,22 @@ rec {
         version = "0.1.0";
         edition = "2021";
         crateBin = [
-          { name = "tvix-cli"; path = "src/main.rs"; }
+          {
+            name = "tvix-cli";
+            path = "src/main.rs";
+            requiredFeatures = [ ];
+          }
         ];
-        src = lib.cleanSourceWith { filter = sourceFilter; src = ./cli; };
+        # We can't filter paths with references in Nix 2.4
+        # See https://github.com/NixOS/nix/issues/5410
+        src =
+          if (lib.versionOlder builtins.nixVersion "2.4pre20211007")
+          then lib.cleanSourceWith { filter = sourceFilter; src = ./cli; }
+          else ./cli;
         dependencies = [
           {
             name = "clap";
-            packageId = "clap 3.2.23";
+            packageId = "clap 4.0.27";
             features = [ "derive" "env" ];
           }
           {
@@ -4219,7 +4225,12 @@ rec {
         crateName = "tvix-eval";
         version = "0.1.0";
         edition = "2021";
-        src = lib.cleanSourceWith { filter = sourceFilter; src = ./eval; };
+        # We can't filter paths with references in Nix 2.4
+        # See https://github.com/NixOS/nix/issues/5410
+        src =
+          if (lib.versionOlder builtins.nixVersion "2.4pre20211007")
+          then lib.cleanSourceWith { filter = sourceFilter; src = ./eval; }
+          else ./eval;
         libName = "tvix_eval";
         dependencies = [
           {
@@ -4325,7 +4336,12 @@ rec {
         crateName = "tvix-eval-builtin-macros";
         version = "0.0.1";
         edition = "2021";
-        src = lib.cleanSourceWith { filter = sourceFilter; src = ./eval/builtin-macros; };
+        # We can't filter paths with references in Nix 2.4
+        # See https://github.com/NixOS/nix/issues/5410
+        src =
+          if (lib.versionOlder builtins.nixVersion "2.4pre20211007")
+          then lib.cleanSourceWith { filter = sourceFilter; src = ./eval/builtin-macros; }
+          else ./eval/builtin-macros;
         procMacro = true;
         authors = [
           "Griffin Smith <root@gws.fyi>"
@@ -4358,9 +4374,18 @@ rec {
         version = "0.1.0";
         edition = "2021";
         crateBin = [
-          { name = "tvix-store"; path = "src/main.rs"; }
+          {
+            name = "tvix-store";
+            path = "src/main.rs";
+            requiredFeatures = [ ];
+          }
         ];
-        src = lib.cleanSourceWith { filter = sourceFilter; src = ./store; };
+        # We can't filter paths with references in Nix 2.4
+        # See https://github.com/NixOS/nix/issues/5410
+        src =
+          if (lib.versionOlder builtins.nixVersion "2.4pre20211007")
+          then lib.cleanSourceWith { filter = sourceFilter; src = ./store; }
+          else ./store;
         dependencies = [
           {
             name = "blake3";
@@ -5149,12 +5174,12 @@ rec {
           {
             name = "winapi-i686-pc-windows-gnu";
             packageId = "winapi-i686-pc-windows-gnu";
-            target = { target, features }: (stdenv.hostPlatform.config == "i686-pc-windows-gnu");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "i686-pc-windows-gnu");
           }
           {
             name = "winapi-x86_64-pc-windows-gnu";
             packageId = "winapi-x86_64-pc-windows-gnu";
-            target = { target, features }: (stdenv.hostPlatform.config == "x86_64-pc-windows-gnu");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-gnu");
           }
         ];
         features = {
@@ -5212,62 +5237,62 @@ rec {
           {
             name = "windows_aarch64_gnullvm";
             packageId = "windows_aarch64_gnullvm";
-            target = { target, features }: (stdenv.hostPlatform.config == "aarch64-pc-windows-gnullvm");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "aarch64-pc-windows-gnullvm");
           }
           {
             name = "windows_aarch64_msvc";
             packageId = "windows_aarch64_msvc";
-            target = { target, features }: (stdenv.hostPlatform.config == "aarch64-pc-windows-msvc");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "aarch64-pc-windows-msvc");
           }
           {
             name = "windows_aarch64_msvc";
             packageId = "windows_aarch64_msvc";
-            target = { target, features }: (stdenv.hostPlatform.config == "aarch64-uwp-windows-msvc");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "aarch64-uwp-windows-msvc");
           }
           {
             name = "windows_i686_gnu";
             packageId = "windows_i686_gnu";
-            target = { target, features }: (stdenv.hostPlatform.config == "i686-pc-windows-gnu");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "i686-pc-windows-gnu");
           }
           {
             name = "windows_i686_gnu";
             packageId = "windows_i686_gnu";
-            target = { target, features }: (stdenv.hostPlatform.config == "i686-uwp-windows-gnu");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "i686-uwp-windows-gnu");
           }
           {
             name = "windows_i686_msvc";
             packageId = "windows_i686_msvc";
-            target = { target, features }: (stdenv.hostPlatform.config == "i686-pc-windows-msvc");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "i686-pc-windows-msvc");
           }
           {
             name = "windows_i686_msvc";
             packageId = "windows_i686_msvc";
-            target = { target, features }: (stdenv.hostPlatform.config == "i686-uwp-windows-msvc");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "i686-uwp-windows-msvc");
           }
           {
             name = "windows_x86_64_gnu";
             packageId = "windows_x86_64_gnu";
-            target = { target, features }: (stdenv.hostPlatform.config == "x86_64-pc-windows-gnu");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-gnu");
           }
           {
             name = "windows_x86_64_gnu";
             packageId = "windows_x86_64_gnu";
-            target = { target, features }: (stdenv.hostPlatform.config == "x86_64-uwp-windows-gnu");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-uwp-windows-gnu");
           }
           {
             name = "windows_x86_64_gnullvm";
             packageId = "windows_x86_64_gnullvm";
-            target = { target, features }: (stdenv.hostPlatform.config == "x86_64-pc-windows-gnullvm");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-gnullvm");
           }
           {
             name = "windows_x86_64_msvc";
             packageId = "windows_x86_64_msvc";
-            target = { target, features }: (stdenv.hostPlatform.config == "x86_64-pc-windows-msvc");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-msvc");
           }
           {
             name = "windows_x86_64_msvc";
             packageId = "windows_x86_64_msvc";
-            target = { target, features }: (stdenv.hostPlatform.config == "x86_64-uwp-windows-msvc");
+            target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-uwp-windows-msvc");
           }
         ];
         features = {
@@ -5591,7 +5616,7 @@ rec {
           "Win32_UI_Xaml" = [ "Win32_UI" ];
           "Win32_UI_Xaml_Diagnostics" = [ "Win32_UI_Xaml" ];
         };
-        resolvedDefaultFeatures = [ "Win32" "Win32_Foundation" "Win32_NetworkManagement" "Win32_NetworkManagement_IpHelper" "Win32_Networking" "Win32_Networking_WinSock" "Win32_Security" "Win32_Storage" "Win32_Storage_FileSystem" "Win32_System" "Win32_System_IO" "Win32_System_Threading" "default" ];
+        resolvedDefaultFeatures = [ "Win32" "Win32_Foundation" "Win32_NetworkManagement" "Win32_NetworkManagement_IpHelper" "Win32_Networking" "Win32_Networking_WinSock" "Win32_Security" "Win32_Storage" "Win32_Storage_FileSystem" "Win32_System" "Win32_System_Console" "Win32_System_IO" "Win32_System_Threading" "default" ];
       };
       "windows_aarch64_gnullvm" = rec {
         crateName = "windows_aarch64_gnullvm";
@@ -5682,26 +5707,25 @@ rec {
     /* Target (platform) data for conditional dependencies.
       This corresponds roughly to what buildRustCrate is setting.
     */
-    defaultTarget = {
-      unix = true;
-      windows = false;
+    makeDefaultTarget = platform: {
+      unix = platform.isUnix;
+      windows = platform.isWindows;
       fuchsia = true;
       test = false;
 
-      # This doesn't appear to be officially documented anywhere yet.
-      # See https://github.com/rust-lang-nursery/rust-forge/issues/101.
-      os =
-        if stdenv.hostPlatform.isDarwin
-        then "macos"
-        else stdenv.hostPlatform.parsed.kernel.name;
-      arch = stdenv.hostPlatform.parsed.cpu.name;
-      family = "unix";
+      /* We are choosing an arbitrary rust version to grab `lib` from,
+      which is unfortunate, but `lib` has been version-agnostic the
+      whole time so this is good enough for now.
+      */
+      os = pkgs.rust.lib.toTargetOs platform;
+      arch = pkgs.rust.lib.toTargetArch platform;
+      family = pkgs.rust.lib.toTargetFamily platform;
       env = "gnu";
       endian =
-        if stdenv.hostPlatform.parsed.cpu.significantByte.name == "littleEndian"
+        if platform.parsed.cpu.significantByte.name == "littleEndian"
         then "little" else "big";
-      pointer_width = toString stdenv.hostPlatform.parsed.cpu.bits;
-      vendor = stdenv.hostPlatform.parsed.vendor.name;
+      pointer_width = toString platform.parsed.cpu.bits;
+      vendor = platform.parsed.vendor.name;
       debug_assertions = false;
     };
 
@@ -5904,12 +5928,12 @@ rec {
       , crateConfigs ? crates
       , buildRustCrateForPkgsFunc
       , runTests
-      , target ? defaultTarget
+      , makeTarget ? makeDefaultTarget
       } @ args:
         assert (builtins.isAttrs crateConfigs);
         assert (builtins.isString packageId);
         assert (builtins.isList features);
-        assert (builtins.isAttrs target);
+        assert (builtins.isAttrs (makeTarget stdenv.hostPlatform));
         assert (builtins.isBool runTests);
         let
           rootPackageId = packageId;
@@ -5917,7 +5941,7 @@ rec {
             (
               args // {
                 inherit rootPackageId;
-                target = target // { test = runTests; };
+                target = makeTarget stdenv.hostPlatform // { test = runTests; };
               }
             );
           # Memoize built packages so that reappearing packages are only built once.
@@ -5926,6 +5950,7 @@ rec {
             let
               self = {
                 crates = lib.mapAttrs (packageId: value: buildByPackageIdForPkgsImpl self pkgs packageId) crateConfigs;
+                target = makeTarget pkgs.stdenv.hostPlatform;
                 build = mkBuiltByPackageIdByPkgs pkgs.buildPackages;
               };
             in
@@ -5942,7 +5967,8 @@ rec {
                   (crateConfig'.devDependencies or [ ]);
               dependencies =
                 dependencyDerivations {
-                  inherit features target;
+                  inherit features;
+                  inherit (self) target;
                   buildByPackageId = depPackageId:
                     # proc_macro crates must be compiled for the build architecture
                     if crateConfigs.${depPackageId}.procMacro or false
@@ -5954,24 +5980,26 @@ rec {
                 };
               buildDependencies =
                 dependencyDerivations {
-                  inherit features target;
+                  inherit features;
+                  inherit (self.build) target;
                   buildByPackageId = depPackageId:
                     self.build.crates.${depPackageId};
                   dependencies = crateConfig.buildDependencies or [ ];
                 };
-              filterEnabledDependenciesForThis = dependencies: filterEnabledDependencies {
-                inherit dependencies features target;
-              };
               dependenciesWithRenames =
-                lib.filter (d: d ? "rename")
-                  (
-                    filterEnabledDependenciesForThis
-                      (
-                        (crateConfig.buildDependencies or [ ])
-                        ++ (crateConfig.dependencies or [ ])
-                        ++ devDependencies
-                      )
-                  );
+                let
+                  buildDeps = filterEnabledDependencies {
+                    inherit features;
+                    inherit (self) target;
+                    dependencies = crateConfig.dependencies or [ ] ++ devDependencies;
+                  };
+                  hostDeps = filterEnabledDependencies {
+                    inherit features;
+                    inherit (self.build) target;
+                    dependencies = crateConfig.buildDependencies or [ ];
+                  };
+                in
+                lib.filter (d: d ? "rename") (hostDeps ++ buildDeps);
               # Crate renames have the form:
               #
               # {
@@ -6046,7 +6074,7 @@ rec {
       else val;
 
     /* Returns various tools to debug a crate. */
-    debugCrate = { packageId, target ? defaultTarget }:
+    debugCrate = { packageId, target ? makeDefaultTarget stdenv.hostPlatform }:
       assert (builtins.isString packageId);
       let
         debug = rec {
@@ -6222,15 +6250,14 @@ rec {
         dependencies;
 
     /* Returns whether the given feature should enable the given dependency. */
-    doesFeatureEnableDependency = { name, rename ? null, ... }: feature:
+    doesFeatureEnableDependency = dependency: feature:
       let
+        name = dependency.rename or dependency.name;
         prefix = "${name}/";
         len = builtins.stringLength prefix;
         startsWithPrefix = builtins.substring 0 len feature == prefix;
       in
-      (rename == null && feature == name)
-      || (rename != null && rename == feature)
-      || startsWithPrefix;
+      feature == name || feature == "dep:" + name || startsWithPrefix;
 
     /* Returns the expanded features for the given inputFeatures by applying the
       rules in featureMap.
@@ -6265,7 +6292,9 @@ rec {
               let
                 enabled = builtins.any (doesFeatureEnableDependency dependency) features;
               in
-              if (dependency.optional or false) && enabled then [ dependency.name ] else [ ]
+              if (dependency.optional or false) && enabled
+              then [ (dependency.rename or dependency.name) ]
+              else [ ]
           )
           dependencies;
       in
diff --git a/tvix/cli/Cargo.toml b/tvix/cli/Cargo.toml
index 605b2c8065..26aabd01cf 100644
--- a/tvix/cli/Cargo.toml
+++ b/tvix/cli/Cargo.toml
@@ -6,5 +6,5 @@ edition = "2021"
 [dependencies]
 tvix-eval = { path = "../eval" }
 rustyline = "10.0.0"
-clap = { version = "3.2.22", features = ["derive", "env"] }
+clap = { version = "4.0", features = ["derive", "env"] }
 dirs = "4.0.0"
diff --git a/tvix/eval/Cargo.toml b/tvix/eval/Cargo.toml
index e4282507d7..b08dc139a9 100644
--- a/tvix/eval/Cargo.toml
+++ b/tvix/eval/Cargo.toml
@@ -26,7 +26,7 @@ backtrace-on-stack-overflow = { version = "0.2.0", optional = true }
 rnix = "0.11.0"
 
 [dev-dependencies]
-criterion = "0.3.6"
+criterion = "0.4"
 test-generator = "0.3.0"
 pretty_assertions = "1.2.1"
 itertools = "0.10.3"
diff --git a/tvix/eval/benches/eval.rs b/tvix/eval/benches/eval.rs
index 3e4da75936..006038490d 100644
--- a/tvix/eval/benches/eval.rs
+++ b/tvix/eval/benches/eval.rs
@@ -1,6 +1,9 @@
 use criterion::{black_box, criterion_group, criterion_main, Criterion};
 use itertools::Itertools;
-use tvix_eval::interpret;
+
+fn interpret(code: &str) {
+    tvix_eval::Evaluation::new(code).evaluate()
+}
 
 fn eval_literals(c: &mut Criterion) {
     c.bench_function("int", |b| {
diff --git a/tvix/nix_cli/Cargo.toml b/tvix/nix_cli/Cargo.toml
index c0b85e56b8..f9de2b9770 100644
--- a/tvix/nix_cli/Cargo.toml
+++ b/tvix/nix_cli/Cargo.toml
@@ -6,7 +6,8 @@ edition = "2021"
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies.clap]
-version = "3.0.5"
+version = "4.0"
+
 [dependencies.tempfile]
 version = "3.2.0"
 
diff --git a/tvix/nix_cli/src/bin/nix-store.rs b/tvix/nix_cli/src/bin/nix-store.rs
index 8d008a414d..c6f7d00a4d 100644
--- a/tvix/nix_cli/src/bin/nix-store.rs
+++ b/tvix/nix_cli/src/bin/nix-store.rs
@@ -2,12 +2,12 @@ fn main() {
     main_args(std::env::args().collect()).unwrap_or_else(|e| e.exit());
 }
 
-pub fn main_args(args: Vec<String>) -> clap::Result<NixResult> {
-    let matches = clap::App::new("nix-store")
-        .subcommand(clap::App::new("--add").arg(clap::Arg::new("FILE").required(true).index(1)))
+pub fn main_args(args: Vec<String>) -> clap::error::Result<NixResult> {
+    let matches = clap::Command::new("nix-store")
+        .subcommand(clap::Command::new("--add").arg(clap::Arg::new("FILE").required(true).index(1)))
         .try_get_matches_from(args.iter())?;
     if let Some(add) = matches.subcommand_matches("--add") {
-        let file = add.value_of("FILE").expect("--add needs a file");
+        let file = add.get_one::<String>("FILE").expect("--add needs a file");
         let file_contents =
             std::fs::read_to_string(file).expect(&format!("file {} does not exist", file));
         Ok(NixResult::FileAddedToStore {