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 <grfn@gws.fyi> Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
b2e0ccfe9a
commit
cbea59c5f6
1 changed files with 1 additions and 1 deletions
2
third_party/nix/default.nix
vendored
2
third_party/nix/default.nix
vendored
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue