diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2018-06-13 17:03:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-13 17:03:56 +0000 |
commit | f35cc5eb42006429738b2866951c06d632301605 (patch) | |
tree | 9dcf2321d5d9db4c09edc4aa9665e5a5cf4a6206 /nixos/doc | |
parent | c4de089cbd4a5fb8f94ee7404ff7a7b946df724a (diff) | |
parent | b01ccbb89918b0c0ab2347405a4a101544045c86 (diff) |
Merge pull request #41764 from oxij/nixos/some-more-related-packages
nixos: add some more related packages
Diffstat (limited to 'nixos/doc')
-rw-r--r-- | nixos/doc/manual/default.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index 2c6309474b37a..fef6b2f86c85f 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -31,11 +31,12 @@ let else p; describe = args: let + title = args.title or null; name = args.name or (lib.concatStringsSep "." args.path); path = args.path or [ args.name ]; package = args.package or (lib.attrByPath path (throw "Invalid package attribute path `${toString path}'") pkgs); in "<listitem>" - + "<para><literal>pkgs.${name} (${package.meta.name})</literal>" + + "<para><literal>${lib.optionalString (title != null) "${title} aka "}pkgs.${name} (${package.meta.name})</literal>" + lib.optionalString (!package.meta.available) " <emphasis>[UNAVAILABLE]</emphasis>" + ": ${package.meta.description or "???"}.</para>" + lib.optionalString (args ? comment) "\n<para>${args.comment}</para>" @@ -51,7 +52,7 @@ let // lib.optionalAttrs (opt ? example) { example = substFunction opt.example; } // lib.optionalAttrs (opt ? default) { default = substFunction opt.default; } // lib.optionalAttrs (opt ? type) { type = substFunction opt.type; } - // lib.optionalAttrs (opt ? relatedPackages) { relatedPackages = genRelatedPackages opt.relatedPackages; }); + // lib.optionalAttrs (opt ? relatedPackages && opt.relatedPackages != []) { relatedPackages = genRelatedPackages opt.relatedPackages; }); # We need to strip references to /nix/store/* from options, # including any `extraSources` if some modules came from elsewhere, |