1 { stdenv, protobuf, nanopb }:
4 name = "nanopb-test-simple-proto3";
8 # protoc requires any .proto file to be compiled to reside within it's
9 # proto_path. By default the current directory is automatically added to the
10 # proto_path. I tried using --proto_path ${./.} ${./simple.proto} and it did
11 # not work because they end up in the store at different locations.
16 ${protobuf}/bin/protoc --plugin=protoc-gen-nanopb=${nanopb}/bin/protoc-gen-nanopb --nanopb_out=$out simple.proto
21 grep -q SimpleMessage $out/simple.pb.c || (echo "ERROR: SimpleMessage not found in $out/simple.pb.c"; exit 1)
22 grep -q SimpleMessage $out/simple.pb.h || (echo "ERROR: SimpleMessage not found in $out/simple.pb.h"; exit 1)