tvl-depot/users/edef/depot-scan.nix
Kane York 88a6bea6e8 fix(users/edef/depot-scan): properly depend on pl script
Change-Id: I83c75ab75dae9c904e127ad6160c7641d4523e40
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1647
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2020-08-05 02:02:17 +00:00

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