on master help sign in
Add nix-strace.sh (wip)
commit0b1596c3d1655d5a3504fe039a0f7caea98cd69f authorMatthew Bauer <mjbauer95@gmail.com> dateSat 29 Apr 2017, 19:53 (9 years ago) parent1584ab8
1 file changed+12
nix-strace.sh+12
nix-strace.shnew file+12
@@ -0,0 +1,12 @@
1+#!/bin/sh
2+
3+pkg="$1"
4+shift
5+exe="$1"
6+shift
7+bin=$(mktemp)
8+out=$(mktemp)
9+~/nix.sh ./nix-bundle.sh $pkg $exe > $bin
10+chmod +x $bin
11+strace -f -o $out $bin $@
12+cat $out | grep -E '^[0-9]+ open\("\.?\/nix' | grep -Ev " = -[0-9]+ [A-Z]+ \([a-zA-Z ]+\)$" | sed -E 's/^[0-9]+ open\("\.?([^\"]+)".*/\1/'