tvl-depot/users/edef/sources.pl
edef 48e47d9280 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
2020-08-05 00:46:00 +00:00

11 lines
230 B
Perl
Executable file

#! /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 '.*' -> '.*'$/;