feat(3p/nix): Add NIX_DATA_DIR to shell hook

all of the executables that get built during regular development depend
on this being set to a directory that contains the nix directory -
previously we had been doing it manually every time, this automates it.

Change-Id: I4c957c0abf0a92ca7122a47d3b141a8ede280e13
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1258
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
Griffin Smith 2020-07-17 18:05:31 -04:00 committed by glittershark
parent f4f72bcf21
commit be6fe93dd4

View file

@ -1,5 +1,8 @@
{ pkgs ? (import ../.. {}).third_party
, buildType ? "release", ... }:
, buildType ? "release"
, depotPath ? ../..
, ...
}:
let
aws-s3-cpp = pkgs.aws-sdk-cpp.override {
@ -115,6 +118,10 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation {
ln -s $out/bin/nix $out/libexec/nix/build-remote
'';
shellHook = ''
export NIX_DATA_DIR="${toString depotPath}/third_party"
'';
# TODO(tazjin): integration test setup?
# TODO(tazjin): docs generation?
}