c4fb0432ae
GitOrigin-RevId: 3fc1143a04da49a92c3663813c6a0c1e8ccd477f
12 lines
364 B
Nix
12 lines
364 B
Nix
{ 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
|
|
''
|