about summary refs log tree commit diff
path: root/tvix/eval/default.nix
blob: f7480e82682833a5e6910ff8410a6bb7d7408915 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ 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.tvix.naerskRootFor ./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 = { };
  });
}))
)