Extra rust subcommands with oxalica rust overlay

I have a flake that uses oxalica rust overlay to provide Rust tooling.

I would like to add the cargo nextest cargo subcommand. This is not yet available in nixpkgs, so I was planning to add it to the flake with an overlay, and, if it works, submit a PR to nxpkgs.

But it turns out that I don’t understand how to use cargo subcommands which are available in nixpkgs, in combination with the oxalica overlay. For example cargo deps (to pick a random example out of many) is already available in nixpkgs: how can this be added to the cargo provided via the oxalica overlay?

If I recall the cargo system correctly, you just need to have a cargo-subcommand in cargos PATH to make cargo subcommand available.

It seems that adding pkgs.cargo-<whatever> to the buildInputs of the flake’s devShell does provide the cargo subcommand.

I must have been failing because of some other unrelated mistake, while trying this out before. Apologies for the noise.