Fil-C on Nix

Filnix wiki

mbrock/filnix

tests/python-protobuf.nix

Fil-C Python's protobuf uses the pure-Python backend (the upb extension is not ported); round-trip protoc-generated messages through it.

λpkgs, pkgsFilc
let
5python=
pkgsFilc.python3.withPackagesps: ps.protobuf
in
pkgsFilc.runCommand"filc-python-protobuf-check" { }
cp ${./protobuf.proto} protobuf.proto
${pkgs.protobuf}/bin/protoc --python_out=. protobuf.proto
PYTHONPATH=. ${python}/bin/python3 ${./python-protobuf.py} | tee log
grep -q '^ok: ' log
touch $out