The external command system should set the $CABAL variable so that external commands can be implemented by re-invoking the cabal executable.
(cf https://doc.rust-lang.org/cargo/reference/external-tools.html#custom-subcommands)