Also just realized I'm dumb and this is for tests, not the NIF. Definitely not a fan of this approach. You should add logic to rebar.config.script that adds a define to erl_opts. I'd also prefer to rely on emulator version for detection rather than a failed parse of some source.