tvl-depot/tvix/tracing/default.nix
Brian Olsen 39ef171e00 chore(tvix): Retain original passthru in Rust builds
When using the runTests feature of crate2nix the derivation that runs the
tests is put into passthru.test but all default.nix files for Rust crates
in Tvix threw that away.

This commit retains passthru so that you can get access to the test
derivation.

Change-Id: I8b7b7db57a49069348f08c12c00a3b1a41a0c05b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12215
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-15 23:37:00 +00:00

11 lines
417 B
Nix

{ depot, lib, ... }:
(depot.tvix.crates.workspaceMembers.tvix-tracing.build.override {
runTests = true;
}).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 = [ "otlp" "tracy" "tonic" "reqwest" "axum" ];
});
})