Too dumb to use allowUnfreePredicate

Doesn’t seem like it? https://github.com/colemickens/nixcfg/blob/caccda46a7df7b026b17054b32667074a69f8281/hosts/zeph/unfree.nix#L21-L22

Looks like lib.getName will take the value of name if it’s set directly, and otherwise pname: https://github.com/NixOS/nixpkgs/blob/ec0b9c96bd9c1f900fa37637533ea668c8f47001/pkgs/stdenv/generic/check-meta.nix#L41

It just so happens that that specific package sets name manually instead of using the pname and version attributes that are recommended these days: https://github.com/NixOS/nixpkgs/blob/84d981bae8b5e783b3b548de505b22880559515f/pkgs/applications/blockchains/trezor-suite/default.nix#L34

I guess lib.getName isn’t actually the correct function to use despite the endorsement in the manual. Wonder what search.nixos.org uses?

1 Like