tvl-depot/users/edef/depot-scan.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
322 B
Nix
Raw Normal View History

{ 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
''