Question Regarding configuration.nix

Hah.

  1. The right solution appears to be checking for both pname and name as showed here.
  2. While parsing pkg.pname works, it is redundant.

    Notice that you shouldn’t have to apply builtins.parseDrvName to pkg.pname , as the latter already is the package name without the version suffix.

Example:

nixpkgs.config.allowUnfreePredicate =
  (pkg: builtins.elem (pkg.pname or (builtins.parseDrvName pkg.name).name)
    [ "unrar" ]);
1 Like