It's nice that there is a workaround, but passing build options is not something that should require a library. There should be a well documented standard way to do it.
It would be good to see something like it built into Nix or Nixpkgs and blessed in the official docs, as the flakes feature approaches completion.