about summary refs log tree commit diff
path: root/.nixery
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-05-02T10·32+0200
committertazjin <tazjin@tvl.su>2022-05-02T23·34+0000
commit0ce396bdab902be626a9055e991551ce6120551e (patch)
treebf834c0bf9bff9886942e2e39d4690df5e704478 /.nixery
parent419dd2a7aa4523bf89f1ff2d4e876f6b85a3bacb (diff)
feat(nix/lazy-deps): Add function to generate lazy binary dispatcher r/3996
There is a reoccuring problem in readTree-type repositories that use
nix-shell, where evaluation of the full set of dependencies that
should be made available to users takes a noticeable amount of time,
slowing down operations when `direnv` is involved.

In depot, we have so far fixed this by maintaining a manual `//bin`
directory which contains a set of symlinks to a central dispatch
script that can dispatch to various tools in depot lazily.

This script can instead be generated ad-hoc by Nix (pretty fast if we
can make assumptions like `git` and `nix-build` existing on user's
machines already) and added to $PATH.

The function introduced in this commit implements the logic for that.
The structure of the script is based on the existing
`//bin/__dispatch`.

This does not yet switch depot's envrc to use this new method of
installing dependencies lazily.

Change-Id: I92efcd9bb6aa51aa2709ad910a464e9dac97ee89
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5512
Tested-by: BuildkiteCI
Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
Diffstat (limited to '.nixery')
0 files changed, 0 insertions, 0 deletions