tvl-depot/tools/depot-build.nix

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

9 lines
309 B
Nix
Raw Normal View History

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