about summary refs log tree commit diff
path: root/tools/depot-build.nix
blob: 5661d58760b563d2a817f091aa09c1363c71ca9c (plain) (blame)
1
2
3
4
5
6
7
8
# Utility script for building any arbitrary depot path in its folder.
{ pkgs, ... }:

pkgs.writeShellScriptBin "depot-build" ''
  TARGET=$(git rev-parse --show-prefix | sed 's|/$||')
  echo "Building //$TARGET"
  nix-build -A $(echo $TARGET | sed 's|/|.|') $(${pkgs.git}/bin/git rev-parse --show-toplevel)
''