about summary refs log blame commit diff
path: root/users/edef/depot-scan.nix
blob: faa91855e8f95504f50468d55ffa4e48d1c33efb (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                   
{ pkgs, ... }:

pkgs.writeShellScriptBin "depot-scan" ''
  set -euo pipefail

  path=$(git rev-parse --show-prefix)
  path="''${path%%/}"
  attr="''${path//\//.}"
  root="$(git rev-parse --show-toplevel)"
  echo "scanning //$path" >&2
  nix-instantiate "$root" -A "$attr" -vv 2> >(${pkgs.perl}/bin/perl sources.pl) >&2
''