blob: 93aaf7c603142e3656c02e3db8a6b3e3318f737c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.info;
in
{
options = {
programs.info.enable = mkOption {
type = types.bool;
default = true;
description = lib.mdDoc "Whether to enable info pages and the {command}`info` command.";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.texinfoInteractive ];
environment.pathsToLink = [ "/info" "/share/info" ];
environment.extraOutputsToInstall = [ "info" ];
environment.postBuild = ''
if test -w $out/share/info; then
shopt -s nullglob
for i in $out/share/info/*.info $out/share/info/*.info.gz; do
${pkgs.texinfoInteractive}/bin/install-info $i $out/share/info/dir
done
fi
'';
};
}
|