oskaritimperi / nimpb

Protocol Buffers for Nim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

allow specifying `protoc` binary instead of forcing to build one from scratch

timotheecour opened this issue · comments

on OSX it's just brew install protobuf ; I'd like to just be able to use that binary (eg maybe in nimcfg or initialization code or something, via protoc_binary=$homebrew_D/bin/protoc)

eg, useful in case user has some custom build of protoc, or doesn't want to recompile from scratch (time consuming: 480 seconds) etc

This is something that should be implemented already (maybe it's a bit undocumented :-). findCompiler() should take care of this by:

  1. checking the environment variable NIMPB_PROTOC
  2. checking if protoc is in path by using os.findExe()
  3. checking if nimpb_protoc is installed and using that if it is

We also currently have a hard dependency on nimpb_protoc in our nimble-file, but I think that could be just removed. Users can install it if they need it, if it is documented well enough.