tests/protobuf.nix
Generate C++ with the Fil-C protoc and round-trip messages through the Fil-C runtime: binary, text and JSON formats, a JSON error (a heap-backed absl::Status), and a million-field message that must parse without a stack frame per field.
λpkgs, pkgsFilc, protobuf?
| pkgs | |
| pkgsFilc | |
| protobuf | default pkgsFilc.protobuf |
pkgsFilc.stdenv.mkDerivation
true
cp ${./protobuf.proto} protobuf.proto
${protobuf}/bin/protoc --version
${protobuf}/bin/protoc --cpp_out=. protobuf.proto
$CXX -std=c++17 -O2 ${./protobuf.cpp} protobuf.pb.cc -I. \
$(pkg-config --cflags --libs protobuf) -o check
./check | tee check.log
grep -q '^ok: ' check.log
touch "$out"