[Nix-dev] Re: bug? nix-env -qa doesnt find what it should

Axel Grosz axel+enamg at iaeste.at
Sat Jun 13 20:24:30 CEST 2009


On Mon, 08 Jun 2009 08:09:30 +0100, Tony White wrote:
> 2009/6/7 Lluís Batlle
>...
> I guess nix-env -qw (w is for wild card) Which does the same thing as
> nix-env -qa '*' | grep  might be a nice feature to add. Thanks for the
> info.
> 
> Kind regards,
> Tony

I think its bad that there is not such a thing for as nix-env --wildcard 
any package manager I know has such.
The intended functionality is not exactly like doing a simple grep for 
more complex responses. 
The semantics of 
nix-env --wildcard would be rather like this

$ nix-env -qw <options> '<search>' # should be same as
$ nix-env -q <options> '*' | grep '<search>' | xargs nix-env -q <options>

example:
$ nix-env -qa '*' | grep tomcat | xargs nix-env -qa --xml --meta
<?xml version='1.0' encoding='utf-8'?>
<items>
  <item attrPath="nixpkgs_stable.tomcat6" name="apache-tomcat-6.0.18" 
system="x86_64-linux">
  </item>
  <item attrPath="nixpkgs_stable.tomcat5" name="jakarta-tomcat-5.0.27" 
system="x86_64-linux">
  </item>
  <item attrPath="nixpkgs_stable.tomcat_connectors" name="tomcat-
connectors-1.2.26" system="x86_64-linux">
  </item>
  <item attrPath="nixpkgs_stable.tomcat_mysql_jdbc" name="tomcat-mysql-
jdbc" system="x86_64-linux">
  </item>
</items>

-- 
regards,
Axel Gross





More information about the nix-dev mailing list