Difference between nix-shell -p and environment.systemPackages

I tried to install an application, in this case Jami. I want to quickly try it so i installed it with nix-shell -p jami. I thought this should be identical to adding it to `environment.systemPackages´ in my nixos configuration. However, using nix-shell does not launch from the terminal, complaining about missing jamid, wheras, after adding to environment.systemPackages, and rebuilding, it launches without problems.

So what is the subtle difference in installation method which I am not getting?

In this case, it involves a dbus service that was added only to your shell’s path, and not the path used by dbus, so the dbus deamon wouldn’t have found it.

  postInstall = ''
    # Make the jamid d-bus services available
    ln -s ${daemon}/share/dbus-1 $out/share
  '';