Skip to content

Wrong documentation for non-free packages #67830

@b-m-f

Description

@b-m-f

Issue description

The documentation at https://nixos.org/nixpkgs/manual/ states:

{
  allowUnfreePredicate = (pkg: builtins.elem
    (builtins.parseDrvName pkg.name).name [
      "flashplayer"
      "vscode"
    ]);
}

Which will produce

$ nix-env -i vscode
installing 'vscode-1.35.1'
error: attribute 'name' missing, at nixpkgs/config.nix:3:28

Technical details

Is fixed when changing the docs to

{
  allowUnfreePredicate = (pkg: builtins.elem
    (builtins.parseDrvName pkg.pname).name [
      "flashplayer"
      "vscode"
    ]);
}

I am not sure if it is always pname or just for VsCode. In addition to that I am not sure how to find the right place to change this. Is the docs/configuration.xml used for this or somehow autogenerated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions