diff options
Diffstat (limited to 'tvix/eval/default.nix')
-rw-r--r-- | tvix/eval/default.nix | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/tvix/eval/default.nix b/tvix/eval/default.nix index 42722e5660ae..9370c81ced1c 100644 --- a/tvix/eval/default.nix +++ b/tvix/eval/default.nix @@ -1,34 +1,16 @@ +# TODO: find a way to build the benchmarks via crate2nix { depot, pkgs, lib, ... }: -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; - - # Tell the test suite where to find upstream nix, to compare eval results - # against - NIX_INSTANTIATE_BINARY_PATH = "${pkgs.nix}/bin/nix-instantiate"; - - meta.ci.targets = builtins.attrNames self.passthru; - - copySources = [ - "builtin-macros" - ]; - - 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 = { }; +(depot.tvix.crates.workspaceMembers.tvix-eval.build.override { + runTests = true; + + # Make C++ Nix available, to compare eval results against. + testInputs = [ pkgs.nix ]; +}).overrideAttrs (old: rec { + meta.ci.targets = lib.filter (x: lib.hasPrefix "with-features" x || x == "no-features") (lib.attrNames passthru); + passthru = old.passthru // (depot.tvix.utils.mkFeaturePowerset { + inherit (old) crateName; + features = [ "nix_tests" ]; + override.testInputs = [ pkgs.nix ]; }); -})) -) +}) |