[Nix-dev] some basic questions from a new NixOS user
Linus Arver
linusarver at gmail.com
Fri Dec 2 06:49:32 CET 2011
Hello Peter,
On Thu, Dec 01, 2011 at 08:55:26AM +0100, Peter Simons wrote:
> Hi Linus,
>
> > The "nix-env -qaP \*" command does work, but I am unable to make sense
> > of the output. For example, there is this line:
> >
> > nixpkgs_sys.haskellPackages_ghc704_no_profiling.xmonad haskell-xmonad-ghc7.0.4-0.10
> >
> > I can see that the second column is the package name, but what is the
> > first column? How do I use it so I can use the "nix-env -iA" syntax?
>
> That attribute path is what "nix-env -iA" expects, i.e.:
>
> nix-env -iA nixpkgs_sys.haskellPackages_ghc704_no_profiling.xmonad
>
Ah, how silly of me. I tried out the command above and indeed it works
fine.
> Note that "haskellPackages_ghc704_no_profiling" and "haskellPackages"
> are synonymous at the moment.
I see. So, for the record, you can do:
$ nix-env -iA nixpkgs_sys.haskellPackages_ghc704_no_profiling.xmonad
or
$ nix-env -iA nixpkgs_sys.haskellPackages.xmonad
to install xmonad as a regular user. Cool stuff!
> > The nix-env manpage explicitly says "nix-env -qaA '*'" gives the
> > attribute paths. Could this be a typo in the manpage?
>
> Yes, it is. :-) I'll commit a fix.
Great. Thanks again, Peter!
-Linus
More information about the nix-dev
mailing list