fix(tvix/utils): Add missing src filtering for nix-compat-derive[-tests]

Change-Id: I2beed2cdcb5423d3594562e0011b1cb889add07f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12390
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
This commit is contained in:
Ilan Joselevich 2024-08-29 01:49:57 +03:00 committed by clbot
parent f2d9255a98
commit 0979379980

View file

@ -34,7 +34,7 @@
fileset = lib.fileset.intersection fileset = lib.fileset.intersection
(lib.fileset.fromSource root) # We build our final fileset from the original src (lib.fileset.fromSource root) # We build our final fileset from the original src
(lib.fileset.unions ([ (lib.fileset.unions ([
(root + "/src") (lib.fileset.maybeMissing (root + "/src")) # src may be missing if the crate just has tests for example
(lib.fileset.fileFilter (f: f.hasExt "rs") root) (lib.fileset.fileFilter (f: f.hasExt "rs") root)
] ++ lib.optionals cargoSupport [ ] ++ lib.optionals cargoSupport [
(lib.fileset.fileFilter (f: f.name == "Cargo.toml") root) (lib.fileset.fileFilter (f: f.name == "Cargo.toml") root)
@ -62,6 +62,15 @@
extraFileset = root + "/testdata"; extraFileset = root + "/testdata";
}; };
}; };
nix-compat-derive = prev: {
src = depot.tvix.utils.filterRustCrateSrc { root = prev.src.origSrc; };
};
nix-compat-derive-tests = prev: {
src = depot.tvix.utils.filterRustCrateSrc { root = prev.src.origSrc; };
};
tvix-build = prev: { tvix-build = prev: {
src = depot.tvix.utils.filterRustCrateSrc rec { src = depot.tvix.utils.filterRustCrateSrc rec {
root = prev.src.origSrc; root = prev.src.origSrc;