about summary refs log tree commit diff
path: root/users/edef/sources.pl
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2020-08-05T00·31+0000
committeredef <edef@edef.eu>2020-08-05T00·46+0000
commit48e47d9280bad0ed6cbd727df9706f4822583358 (patch)
tree629710ab3d4db940a9437a2cecbde37d137c2d60 /users/edef/sources.pl
parent58e3608e258d35e1a8b132cd65a20d2200f01b9f (diff)
feat(edef/depot-scan): init r/1587
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
Diffstat (limited to 'users/edef/sources.pl')
-rwxr-xr-xusers/edef/sources.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/users/edef/sources.pl b/users/edef/sources.pl
new file mode 100755
index 000000000000..39550d83c1a5
--- /dev/null
+++ b/users/edef/sources.pl
@@ -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 '.*' -> '.*'$/;