88a6bea6e8
Change-Id: I83c75ab75dae9c904e127ad6160c7641d4523e40 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1647 Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI
12 lines
340 B
Nix
12 lines
340 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 "$root" -A "$attr" -vv 2> >(${pkgs.perl}/bin/perl ${./depot-scan.pl}) >&2
|
|
''
|