Also, if you want to know where an attribute is defined, you can use:
nix-repl> builtins.unsafeGetAttrPos "pam" pkgs
{
column = 3;
file = "/nix/store/9g7xq4cldszn00p70awljpim92xg2c1s-source/pkgs/top-level/all-packages.nix";
line = 27037;
}
which (given that my nixpkgs revision is c3aa7b8938b17aebd2deecf7be0636000d62a2b9
) points to https://github.com/NixOS/nixpkgs/blob/c3aa7b8938b17aebd2deecf7be0636000d62a2b9/pkgs/top-level/all-packages.nix#L27037
If the above command shows null
, it’s probably defined in pkgs/by-name
instead (which you can verify with the meta.position
as mentioned above).