Why doesn’t a package search (nix-env -qaP <text>
) not find existing Perl packages?
For example, I’m searching for the Perl package MIME::Lite
, which is available according to the online search and installable as nix-env -iA nixpkgs.perl534Packages.MIMELite
. It’s also listed in the full output of nix-env -qaP
:
$ nix-env -qaP | grep -i MIMELite
nixpkgs.perl532Packages.MIMELite perl5.32.1-MIME-Lite-3.031
nixpkgs.perl532Packages.MIMELiteHTML perl5.32.1-MIME-Lite-HTML-1.24
nixpkgs.perl534Packages.MIMELite perl5.34.0-MIME-Lite-3.031
nixpkgs.perl534Packages.MIMELiteHTML perl5.34.0-MIME-Lite-HTML-1.24
But doing an explicit search like nix-env -qaP '.*MIMELite.*
won’t see it:
$ nix-env -qaP '.*MIMELite.*'
error: selector '.*MIMELite.*' matches no derivations
Same as a naked string MIMELite
, and same when run under sudo -i
[1]. I have the same issue with packages under python39Packages
.
For background, this is a newly-installed (multi-user) nix 2.5.1 on macos M1 (darwin-arm64), using channel nixpgs-unstable
(the default, apparently) and I’m a noob with nix.
How can I search for language-specific packages at the CLI ?
[1] I’m still confused about the effects of the “invisible” channel, which is installed/visible to root but not for users, and adding the channel to a user causes the on nix-env operations: warning: name collision in input Nix expressions, skipping '/Users/jlargentaye/.nix-defexpr/channels_root/nixpkgs'