68ab0a0705
Change-Id: If202b466aa0874048e89e0dc270ff14883510131 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1652 Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI
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
|
|
''
|