blob: a9c0f382ff45e2d73af0b55c038c1bc2a953c41d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
{ pkgs, ... }:
pkgs.writeShellScriptBin "depot-scan" ''
set -euo pipefail
path="''${1:-$(git rev-parse --show-prefix)}"
path="''${path%%/}"
attr="''${path//\//.}"
root="$(git rev-parse --show-toplevel)"
echo "scanning //$path" >&2
nix-instantiate -E "import ${./wrap.nix} $root" -A "$attr" -vv 2> >(${pkgs.perl}/bin/perl ${./depot-scan.pl}) >&2
''
|