How to replace `nix develop` with `nix-shell` for a flake-based output?

I never learned the old-style commands, since flakes were already en vogue when I started learning nix, but I keep running into sharp edges with nix develop.

Ran into this today while trying to figure out why my extraConfig wasn’t being passed to ubootRaspberryPi4_64bit with nix develop but was with nix build. So it looks like I need to use nix-shell instead?

Is there a way use nix-shell with a flake-based output? In this case .#nixosConfigurations.mypi.pkgs.ubootRaspberryPi4_64bit, so it includes my overrides.

This is as close as I’ve gotten, but I’m missing my flake inputs:

$ nix-shell \
    -I nixos-config=/home/n8henrie/git/nixos/system-configs/homeslice/configuration.nix \
    --argstr system aarch64-linux \
    '<nixpkgs/nixos>' \
    -A pkgs.ubootRaspberryPi4_64bit 
error: attribute 'inputs' missing

       at /home/n8henrie/git/nixos/system-configs/homeslice/hardware.nix:8:5:

            7|     (modulesPath + "/installer/scan/not-detected.nix")
            8|     attrs.inputs.nixos-hardware.nixosModules.raspberry-pi-4
             |     ^
            9|   ];
(use '--show-trace' to show detailed location information)

Adding --arg inputs '"foo"' still results in error: attribute 'inputs' missing

EDIT: (inputs is passed as specialArgs by my flake)