From cbcbede8e0aaf050406da3f7b5eaaf185da77f6b Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 12 Feb 2026 19:41:00 +0100 Subject: [PATCH] config.nix: document `packageOverrides` and `perlPackageOverrides` These are handled in the NixOS modules for `nixpkgs.config` as special merges; add them here. --- pkgs/top-level/config.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix index 526dd4182702..3f7ad3b20f29 100644 --- a/pkgs/top-level/config.nix +++ b/pkgs/top-level/config.nix @@ -471,6 +471,22 @@ let ''; }; + packageOverrides = mkOption { + type = types.functionTo types.attrs; + default = pkgs: { }; + description = '' + A function to replace or add packages in `pkgs` expects an attrset to be returned when called. + ''; + }; + + perlPackageOverrides = mkOption { + type = types.functionTo types.attrs; + default = pkgs: { }; + description = '' + The same as `packageOverrides` but for packages in the perl package set. + ''; + }; + problems = (import ../stdenv/generic/problems.nix { inherit lib; }).configOptions; };