diff options
author | Jan Malakhovski <oxij@oxij.org> | 2018-04-05 22:27:46 +0000 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2018-04-23 15:08:58 +0200 |
commit | fbd4563b537ee083ffdc6964cf027e542a2ff249 (patch) | |
tree | 2a3c8487061dd3101c1a500bf60fffcd5528e925 /nixos | |
parent | 483815a743e1cb1676ddef4cf5621f3216dbbaff (diff) | |
download | nixpkgs-fbd4563b537ee083ffdc6964cf027e542a2ff249.tar nixpkgs-fbd4563b537ee083ffdc6964cf027e542a2ff249.tar.gz nixpkgs-fbd4563b537ee083ffdc6964cf027e542a2ff249.tar.bz2 nixpkgs-fbd4563b537ee083ffdc6964cf027e542a2ff249.tar.lz nixpkgs-fbd4563b537ee083ffdc6964cf027e542a2ff249.tar.xz nixpkgs-fbd4563b537ee083ffdc6964cf027e542a2ff249.tar.zst nixpkgs-fbd4563b537ee083ffdc6964cf027e542a2ff249.zip |
nixos: documentation: implement `documentation.dev.enable` option
I know that "devinfo" output does not currently exist, but so does "devman". It is mentioned in the nixpkgs manual, but no derivation in nixpkgs actually uses it.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/misc/documentation.nix | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix index 4af40a6bb42..2e426c01708 100644 --- a/nixos/modules/misc/documentation.nix +++ b/nixos/modules/misc/documentation.nix @@ -50,6 +50,21 @@ let cfg = config.documentation; in ''; }; + dev.enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to install documentation targeted at developers. + <itemizedlist> + <listitem><para>This includes man pages targeted at developers if <option>man.enable</option> is + set (this also includes "devman" outputs).</para></listitem> + <listitem><para>This includes info pages targeted at developers if <option>info.enable</option> + is set (this also includes "devinfo" outputs).</para></listitem> + <listitem><para>This includes other pages targeted at developers if <option>doc.enable</option> + is set (this also includes "devdoc" outputs).</para></listitem> + </itemizedlist> + ''; + }; }; @@ -60,20 +75,20 @@ let cfg = config.documentation; in (mkIf cfg.man.enable { environment.systemPackages = [ pkgs.man-db ]; environment.pathsToLink = [ "/share/man" ]; - environment.extraOutputsToInstall = [ "man" ]; + environment.extraOutputsToInstall = [ "man" ] ++ optional cfg.dev.enable [ "devman" ]; }) (mkIf cfg.info.enable { environment.systemPackages = [ pkgs.texinfoInteractive ]; environment.pathsToLink = [ "/share/info" ]; - environment.extraOutputsToInstall = [ "info" ]; + environment.extraOutputsToInstall = [ "info" ] ++ optional cfg.dev.enable [ "devinfo" ]; }) (mkIf cfg.doc.enable { # TODO(@oxij): put it here and remove from profiles? # environment.systemPackages = [ pkgs.w3m ]; # w3m-nox? environment.pathsToLink = [ "/share/doc" ]; - environment.extraOutputsToInstall = [ "doc" ]; + environment.extraOutputsToInstall = [ "doc" ] ++ optional cfg.dev.enable [ "devdoc" ]; }) ]); |