Question Regarding configuration.nix

The pkgs.json in addition to nix install seemed quite viable, so I made a proof-of-concept this evening: Pocnix: a proof-of-concept Nix CLI

1 Like

It needs to be pkg.pname instead of At least, on nixos-19.09.
Following the issue

1 Like


  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.


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