blob: f0654188c87a088f6710b8f021f2d7df93f64b07 (
plain) (
tree)
|
|
{ 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 ${./depot-scan-wrap.nix} {} $root" -A "$attr" -vv 2> >(${pkgs.perl}/bin/perl ${./depot-scan.pl}) >&2
''
|