nixpkgs/pkgs/stdenv/generic
Dan Callahan ec6c594944 stdenv/check-meta: Fix error message for disallowed unfree packages
Nixpkgs tries to print a helpful message when it blocks unfree packages,
but the suggestion is subtly broken. The predicate only matches on the
package's name, but the suggestion includes the full name-version pair.

Fixed by formatting the message with the same function as the predicate.

This issue arises because check-meta defines its own local getName with
semantics divergent from lib.getName. The former includes the version,
the latter does not.

Example Before:

    Alternatively you can configure a predicate to allow specific packages:
      { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
          "obsidian-1.5.12"
        ];
      }

Example After:

    Alternatively you can configure a predicate to allow specific packages:
      { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
          "obsidian"
        ];
      }

Fixes #303116
2024-04-10 16:15:24 +01:00
..
builder.sh
check-meta.nix stdenv/check-meta: Fix error message for disallowed unfree packages 2024-04-10 16:15:24 +01:00
common-path.nix stdenv/common-path.nix: move to stdenv/generic/ 2022-07-29 18:24:00 -04:00
default-builder.sh treewide: refactor .attrs.sh detection 2023-10-04 18:36:57 +02:00
default.nix make-derivation.nix: Return mkDerivation as an attribute 2024-03-11 17:06:02 +01:00
make-derivation.nix make-derivation.nix: Fix checkMetaRecursively 2024-03-17 19:28:47 +01:00
meta-types.nix stdenv/check-meta: Use bespoke type checking 2023-12-26 15:14:42 +13:00
setup.sh Merge #286721: stdenv: fix rare tar.xz decompression issues 2024-02-17 08:45:01 +01:00