Adding manpages to a devShell

I’ve being trying to add manpages of packages that split their outputs into out and man to no avail. Whether I add the latter to mkShell’s packages, I still cannot access the manpage. Is there another step that needs to be done so that the manpages are available for the devShell?

Here’s a simple flake.nix which can reproduce what is described:

{
  description = "A very basic flake";

  outputs = {
    self,
    nixpkgs,
  }: let
    pkgs = nixpkgs.legacyPackages.x86_64-linux;
  in {
    devShells.x86_64-linux.default = pkgs.mkShell {
      name = "no-manpange-for-scdoc";
      packages = [pkgs.scdoc.out pkgs.scdoc.man];
    };
  };
}

I ended up creating this PR (it touches a quite-sensitive part of Nixpkgs, so I don’t really have the bandwidth to make enough noise to have it merged and just carry it in my own fork…): mkshell: amend MANPATH and INFOPATH according to inputs by cmm · Pull Request #234367 · NixOS/nixpkgs · GitHub