Homebrew governance sucks. The only problem with that is MacPorts requires sudo, which risks the stability of the system. Maybe Nix works on Mac? Or skip shoehorning fragile patched software on a hostile system that is entirely different from production and use tools in containers more similar to production instead.
If you are building for linux, why not use linux tools, in a linux container (which runs on a linux kernel running on a hypervisor?) Apple even provides a Container tool, Containerization framework, etc.
For using Unix tools in native macOS workflows, ports systems like homebrew, macports, pkgsrc, etc. are a decent option.
nix-Darwin is great, but it doesn’t really make sense in combination with brew. You can manage brew packages in your nix-Darwin config, but I’ve found no need to as of yet