From cbea59c5f65e616d5fe2a76c4577f7e806936272 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 18 Jul 2020 00:16:13 +0000 Subject: chore(3p/nix): don't rebuild nix-proto-srcs as much Interpolating a path into a string will copy the referenced path into the Nix store, so this got a dependency on all of src. By first constructing a path to the src/proto directory using the + operator, and then interpolating it, we limit what is copied to the store, and therefore what code triggers a nix-proto-srcs rebuild. Change-Id: I8dd750f6bc5902b74ffb56470bc8a5f2c01c8cf1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1263 Tested-by: BuildkiteCI Reviewed-by: glittershark Reviewed-by: tazjin --- third_party/nix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix index b4f16d02c7ac..c4a30501697f 100644 --- a/third_party/nix/default.nix +++ b/third_party/nix/default.nix @@ -21,7 +21,7 @@ let # Proto generation in CMake is theoretically possible, but that is # very theoretical - this does it in Nix instead. protoSrcs = pkgs.runCommand "nix-proto-srcs" {} '' - export PROTO_SRCS=${src}/src/proto + export PROTO_SRCS=${src + "/src/proto"} mkdir -p $out/libproto ${pkgs.protobuf}/bin/protoc -I=$PROTO_SRCS \ --cpp_out=$out/libproto \ -- cgit 1.4.1