forked from mirrors/nixpkgs
Factor out "man" into a separate module and add "man" outputs to system.path
Fixes #10270.
This commit is contained in:
parent
58e9440b89
commit
c20403631d
|
@ -28,7 +28,6 @@ let
|
|||
pkgs.xz
|
||||
pkgs.less
|
||||
pkgs.libcap
|
||||
pkgs.man
|
||||
pkgs.nano
|
||||
pkgs.ncurses
|
||||
pkgs.netcat
|
||||
|
@ -106,7 +105,6 @@ in
|
|||
"/info"
|
||||
"/lib" # FIXME: remove
|
||||
#"/lib/debug/.build-id" # enables GDB to find separated debug info
|
||||
"/man"
|
||||
"/sbin"
|
||||
"/share/applications"
|
||||
"/share/desktop-directories"
|
||||
|
@ -114,7 +112,6 @@ in
|
|||
"/share/emacs"
|
||||
"/share/icons"
|
||||
"/share/info"
|
||||
"/share/man"
|
||||
"/share/menus"
|
||||
"/share/mime"
|
||||
"/share/nano"
|
||||
|
|
|
@ -61,9 +61,11 @@
|
|||
./programs/command-not-found/command-not-found.nix
|
||||
./programs/dconf.nix
|
||||
./programs/environment.nix
|
||||
./programs/freetds.nix
|
||||
./programs/ibus.nix
|
||||
./programs/kbdlight.nix
|
||||
./programs/light.nix
|
||||
./programs/man.nix
|
||||
./programs/nano.nix
|
||||
./programs/screen.nix
|
||||
./programs/shadow.nix
|
||||
|
@ -73,7 +75,6 @@
|
|||
./programs/uim.nix
|
||||
./programs/venus.nix
|
||||
./programs/wvdial.nix
|
||||
./programs/freetds.nix
|
||||
./programs/xfs_quota.nix
|
||||
./programs/zsh/zsh.nix
|
||||
./rename.nix
|
||||
|
|
30
nixos/modules/programs/man.nix
Normal file
30
nixos/modules/programs/man.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
programs.man.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable manual pages and the <command>man</command> command.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
config = mkIf config.programs.man.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.man ];
|
||||
|
||||
environment.pathsToLink = [ "/share/man" ];
|
||||
|
||||
environment.outputsToLink = [ "man" ];
|
||||
|
||||
};
|
||||
|
||||
}
|
|
@ -92,7 +92,9 @@ in
|
|||
|
||||
system.build.manual = manual;
|
||||
|
||||
environment.systemPackages = [ manual.manpages manual.manual help ];
|
||||
environment.systemPackages =
|
||||
[ manual.manual help ]
|
||||
++ optional config.programs.man.enable manual.manpages;
|
||||
|
||||
boot.extraTTYs = mkIf cfg.showManual ["tty${cfg.ttyNumber}"];
|
||||
|
||||
|
|
Loading…
Reference in a new issue