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
It needs to be
pkg.pname instead of
pkg.name. At least, on nixos-19.09.
Following the issue https://github.com/NixOS/nixpkgs/issues/67830.
- The right solution appears to be checking for both
nameas showed here.
- While parsing
pkg.pnameworks, it is redundant.
Notice that you shouldn’t have to apply
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 pkg.name).name) [ "unrar" ]);