about summary refs log tree commit diff
path: root/tvix/eval
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval')
-rw-r--r--tvix/eval/default.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/tvix/eval/default.nix b/tvix/eval/default.nix
index aa8d8a4af414..5147ebe8e678 100644
--- a/tvix/eval/default.nix
+++ b/tvix/eval/default.nix
@@ -1,13 +1,11 @@
 { depot, pkgs, lib, ... }:
 
-lib.fix (self:
-depot.third_party.naersk.buildPackage {
+lib.fix (self: depot.third_party.naersk.buildPackage (lib.fix (naerskArgs: {
   src = depot.third_party.gitignoreSource ./.;
   # see https://github.com/nix-community/naersk/issues/169
   root = depot.nix.sparseTree ./. [ ./Cargo.lock ./Cargo.toml ];
 
   doCheck = true;
-  cargoBuildOptions = opts: opts ++ [ "--all-targets" ];
 
   # Tell the test suite where to find upstream nix, to compare eval results
   # against
@@ -15,6 +13,20 @@ depot.third_party.naersk.buildPackage {
 
   meta.ci.targets = builtins.attrNames self.passthru;
 
+  passthru.benchmarks = depot.third_party.naersk.buildPackage (naerskArgs // {
+    name = "tvix-eval-benchmarks";
+
+    doCheck = false;
+
+    cargoBuildOptions = opts: opts ++ [ "--benches" ];
+
+    copyBinsFilter = ''
+      select(.reason == "compiler-artifact" and any(.target.kind[] == "bench"; .))
+    '';
+
+    passthru = { };
+  });
+
   passthru.cpp-nix-run-lang-tests = pkgs.stdenv.mkDerivation {
     name = "cpp-nix-run-lang-tests";
 
@@ -129,5 +141,5 @@ depot.third_party.naersk.buildPackage {
       exit $fail
     '';
   };
-}
+}))
 )