about summary refs log tree commit diff
path: root/third_party/nix/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-07-18T00·16+0000
committerAlyssa Ross <hi@alyssa.is>2020-07-18T18·19+0000
commitcbea59c5f65e616d5fe2a76c4577f7e806936272 (patch)
treee6bf673477b5f91b5047c7c2c2ef139715897f7e /third_party/nix/default.nix
parentb2e0ccfe9a0ed24f3fb09308d86c65ec3086433b (diff)
chore(3p/nix): don't rebuild nix-proto-srcs as much r/1380
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 <grfn@gws.fyi>
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'third_party/nix/default.nix')
-rw-r--r--third_party/nix/default.nix2
1 files changed, 1 insertions, 1 deletions
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 \