[Nix-dev] Confused about packages

Amy de Buitléir amy at nualeargais.ie
Fri May 15 23:09:53 CEST 2015


I'm new to NixOS, and I'm confused about the relation between packages,
nix-env, and /etc/nixos/configuration.nix. In case it matters, I'm on
nixos-unstable:

[root at wombat9000:~]# nix-channel --list
nixos https://nixos.org/channels/nixos-unstable

Q 1. Why do some packages have version numbers, and some don't? Are the ones
without version numbers some sort of "virtual" package?

[amy at wombat9000:~]$ nix-env -qa | grep dzen2
dzen2-0.9.5                       

[amy at wombat9000:~]$ nix-env -qa | grep dmenu2
dmenu2

Q 2. Why can't I find some packages that I would expect to find? Are they
"hidden"? For example, I have the following in my /etc/nixos/configuration.nix:

  environment.systemPackages = with pkgs; [
    dmenu2
    dzen2
    haskellPackages.xmonad
    haskellPackages.xmonadContrib
    haskellPackages.xmonadExtras
    wget
    xsel
  ];

But if someone hadn't told me the names to put there, how could I have found
the names of the packages? Searching for them using nix-env didn't find them:

[root at wombat9000:~]# nix-env -qaP | grep haskellPackages

[root at wombat9000:~]# nix-env -qaP | grep xmonadContrib

[root at wombat9000:~]# nix-env -qaP | grep xmonadExtras





More information about the nix-dev mailing list