This is indeed intended behavior as the proper name to refer to the package is xdg_utils
.
The package has attribute path xdg_utils
, which identifies this package within Nixpkgs. The name xdg-utils-1.1.3
is merely a used in the file names as a suggestion. Many different packages can share the same name, finding a package with a certain name, and most tools do not care about it. (There’s some legacy behavior in nix-env
, which I’ll not get into.)
I’m not sure where you got the name xdg-utils
from, but searching it on search.nixos.org gives this result here: https://search.nixos.org/packages?channel=20.09&query=xdg-utils, which clearly shows the name xdg_utils
, which is what you should use for almost all intents and purposes.
If you use nix search xdg-utils
you will see it that it is to be referred to as nixpkgs.xdg_utils
as well. Stack will add nixpkgs.
(basically) for you so you will only have to write xdg_utils
.