[Nix-dev] A few questions from a NixOS newbie.

Bjørn Forsman bjorn.forsman at gmail.com
Mon Apr 21 15:16:01 CEST 2014


On 21 April 2014 14:56, Kirill Elagin <kirelagin at gmail.com> wrote:
> On Mon, Apr 21, 2014 at 4:23 PM, Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>
> wrote:
[...]
>> * How can I find out more about packages? For example, I'd like to query
>> a package of a license, or to see its .nix file. Someone told me on IRC
>> how to do the second one but it involved grepping all-packages.nix,
>> getting the path from there and then opening that. Is there no mechanism
>> in place which can tell me more about a package? I'd expect at least the
>> information given by the `eix' tool on Gentoo: installed and available
>> versions, short description, homepage and license. It seems to me like
>> fairly basic and useful information.
>
> Unfortunately, that's the way to go now. Grep `all-packages.nix`, find
> expression path, and open it.

There is also nix-repl. I guess it's not exactly what you're looking
for, but it's useful to know about it:

$ nix-repl
Welcome to Nix version 1.7. Type :? for help.

nix-repl> :l <nixpkgs>
Added 3747 variables.

nix-repl> :p wireshark.meta.license
{ fullName = "GNU General Public License version 2"; shortName =
"GPLv2"; url = "http://www.gnu.org/licenses/old-licenses/gpl-2.0.html";
}

nix-repl> :p wireshark.meta
{ description = "a powerful network protocol analyzer"; homepage =
"http://www.wireshark.org/"; license = { fullName = "GNU General
Public License version 2"; shortName = "GPLv2"; url =
"http://www.gnu.org/licenses/old-licenses/gpl-2.0.html"; };
longDescription = "Wireshark (formerly known as \"Ethereal\") is a
powerful network\nprotocol analyzer developed by an international team
of networking\nexperts. It runs on UNIX, OS X and Windows.\n";
maintainers = [ "Peter Simons <simons at cryp.to>" ]; platforms = [
"i686-linux" "x86_64-linux" "armv5tel-linux" "armv7l-linux"
"mips64el-linux" ]; position =
"/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/applications/networking/sniffers/wireshark/default.nix:47";
}


Best regards,
Bjørn Forsman


More information about the nix-dev mailing list