I have a custom nix-channel that I have built. It only has a small set of packages that I have created. I can install these packages just fine with nix-env -i <package-name> but I can get nix-shell or nix run to recognize them. I realize that nix-env doesn’t use the NIX_PATH. However, I can’t figure out how to call nix-shell in a way that gives it access to these packages. That severely limits the usefulness of the channel. I can’t just point nixpkgs= in NIX_PATH to that channel because it only contains a small set of packages, not the entire set of nix packages.
Also note that these are not public packages that can be added to the global nix repo.
So whats the magic incantation for nix shell to make these packages available to it?
There might be a shorter way to do this with nix-shell. Though I generally prefer exposing a package set as an attribute through packageOverrides over using channels. See: