Change-Id: I493e7d20504d34f83a53db50b69e86668874756e Reviewed-on: https://cl.tvl.fyi/c/depot/+/1651 Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI
17 lines
532 B
Nix
17 lines
532 B
Nix
# this wraps import to override readFile and readDir to trace the files it touches
|
|
# technique inspired by lorri
|
|
{ ... }:
|
|
|
|
let
|
|
|
|
global = {
|
|
import = global.scopedImport {};
|
|
scopedImport = x: builtins.scopedImport (global // x);
|
|
builtins = builtins // {
|
|
inherit (global) import scopedImport;
|
|
readFile = path: builtins.trace "depot-scan '${toString path}'" (builtins.readFile path);
|
|
readDir = path: builtins.trace "depot-scan '${toString path}'" (builtins.readDir path);
|
|
};
|
|
};
|
|
|
|
in global.import
|