On 7 June 2012 14:59, Daniel Santa Cruz <[email protected]> wrote: > After reading and re-reading the man page, I'm still not sure how to > do a query that will output the attribute path of installed packages. > I figured that I could change: > >> nix-env -qaP "*" > > into: > >> nix-env -q --installed -P "*"
If all your packages are the latest version and/or still exist in nixpkgs with the same version this should work: > nix-env -q '*' | xargs nix-env -qaP This will search for all packages with the same name and version as the already installed ones and print their attrPath. Note however that this will fail any of the packages has been updated to a newer version on nixpkgs (and the old version was removed). Otherwise you could search for all versions of the installed packages: > nix-env -q '*'| sed 's/-[0-9].*//' |xargs nix-env -qaP This will still fail if any of the packages was deleted, but I suppose you can live with that. _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
