mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 06:31:20 +00:00
nixos/documentation.man.mandb: Add skipPackages option, and include nixos-version
prevents unnecessary recreation of man caches Fixes #209835
This commit is contained in:
parent
a18ba087b9
commit
96ec8c7623
@ -235,6 +235,8 @@ in
|
||||
nixos-enter
|
||||
] ++ lib.optional (nixos-option != null) nixos-option;
|
||||
|
||||
documentation.man.man-db.skipPackages = [ nixos-version ];
|
||||
|
||||
system.build = {
|
||||
inherit nixos-install nixos-generate-config nixos-option nixos-rebuild nixos-enter;
|
||||
};
|
||||
|
@ -13,11 +13,21 @@ in
|
||||
example = false;
|
||||
};
|
||||
|
||||
skipPackages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [];
|
||||
internal = true;
|
||||
description = lib.mdDoc ''
|
||||
Packages to *not* include in the man-db.
|
||||
This can be useful to avoid unnecessary rebuilds due to packages that change frequently, like nixos-version.
|
||||
'';
|
||||
};
|
||||
|
||||
manualPages = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = pkgs.buildEnv {
|
||||
name = "man-paths";
|
||||
paths = config.environment.systemPackages;
|
||||
paths = lib.subtractLists cfg.skipPackages config.environment.systemPackages;
|
||||
pathsToLink = [ "/share/man" ];
|
||||
extraOutputsToInstall = [ "man" ]
|
||||
++ lib.optionals config.documentation.dev.enable [ "devman" ];
|
||||
|
Loading…
Reference in New Issue
Block a user