mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
b9df4311dc
For now, leave the old implementation under `man-old` attribute. Small warning: I had a leftover ~/.nix-profile/man from an old package, which caused man-db's man prefer it and ignore ~/.nix-profile/share/man. The PATH->MANPATH code just selects the first match for each PATH item.
31 lines
475 B
Nix
31 lines
475 B
Nix
{ 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-db ];
|
|
|
|
environment.pathsToLink = [ "/share/man" ];
|
|
|
|
environment.extraOutputsToInstall = [ "man" ];
|
|
|
|
};
|
|
|
|
}
|