feat(edef/depot-scan): init

A small script that parses `nix-instantiate -vv` output to track the
files read while instantiating a depot build.

Change-Id: I5acf31d55f39c1d1acf9cdead03d33e2c8abab6a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1646
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
This commit is contained in:
edef 2020-08-05 00:31:18 +00:00
parent 58e3608e25
commit 48e47d9280
2 changed files with 23 additions and 0 deletions

11
users/edef/sources.pl Executable file
View file

@ -0,0 +1,11 @@
#! /usr/bin/env -S perl -ln
use strict;
if (/^evaluating file '(.*)'$/ or
/^copied source '(.*)' -> '.*'$/ or
/^trace: lorri read: '(.*)'$/) {
print $1;
next;
}
print STDERR unless /^instantiated '.*' -> '.*'$/;