pkgs/top-level: convert to MD option docs

authored by pennae and committed by pennae 5f53dac6 e1e3b48e

+17 -17
+17 -17
pkgs/top-level/config.nix
··· 9 9 mkMassRebuild = args: mkOption (builtins.removeAttrs args [ "feature" ] // { 10 10 type = args.type or (types.uniq types.bool); 11 11 default = args.default or false; 12 - description = (args.description or '' 12 + description = lib.mdDoc ((args.description or '' 13 13 Whether to ${args.feature} while building nixpkgs packages. 14 14 '') + '' 15 15 Changing the default may cause a mass rebuild. 16 - ''; 16 + ''); 17 17 }); 18 18 19 19 options = { ··· 34 34 /* Config options */ 35 35 36 36 warnUndeclaredOptions = mkOption { 37 - description = "Whether to warn when <literal>config</literal> contains an unrecognized attribute."; 37 + description = lib.mdDoc "Whether to warn when `config` contains an unrecognized attribute."; 38 38 type = types.bool; 39 39 default = false; 40 40 }; 41 41 42 42 doCheckByDefault = mkMassRebuild { 43 - feature = "run <literal>checkPhase</literal> by default"; 43 + feature = "run `checkPhase` by default"; 44 44 }; 45 45 46 46 strictDepsByDefault = mkMassRebuild { 47 - feature = "set <literal>strictDeps</literal> to true by default"; 47 + feature = "set `strictDeps` to true by default"; 48 48 }; 49 49 50 50 enableParallelBuildingByDefault = mkMassRebuild { 51 - feature = "set <literal>enableParallelBuilding</literal> to true by default"; 51 + feature = "set `enableParallelBuilding` to true by default"; 52 52 }; 53 53 54 54 configurePlatformsByDefault = mkMassRebuild { 55 - feature = "set <literal>configurePlatforms</literal> to <literal>[\"build\" \"host\"]</literal> by default"; 55 + feature = "set `configurePlatforms` to `[\"build\" \"host\"]` by default"; 56 56 }; 57 57 58 58 contentAddressedByDefault = mkMassRebuild { 59 - feature = "set <literal>__contentAddressed</literal> to true by default"; 59 + feature = "set `__contentAddressed` to true by default"; 60 60 }; 61 61 62 62 allowAliases = mkOption { 63 63 type = types.bool; 64 64 default = true; 65 - description = '' 65 + description = lib.mdDoc '' 66 66 Whether to expose old attribute names for compatibility. 67 67 68 68 The recommended setting is to enable this, as it ··· 82 82 default = false; 83 83 # getEnv part is in check-meta.nix 84 84 defaultText = literalExpression ''false || builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1"''; 85 - description = '' 85 + description = lib.mdDoc '' 86 86 Whether to allow unfree packages. 87 87 88 - See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-unfree">Installing unfree packages</link> in the NixOS manual. 88 + See [Installing unfree packages](https://nixos.org/manual/nixpkgs/stable/#sec-allow-unfree) in the NixOS manual. 89 89 ''; 90 90 }; 91 91 ··· 94 94 default = false; 95 95 # getEnv part is in check-meta.nix 96 96 defaultText = literalExpression ''false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"''; 97 - description = '' 97 + description = lib.mdDoc '' 98 98 Whether to allow broken packages. 99 99 100 - See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-broken">Installing broken packages</link> in the NixOS manual. 100 + See [Installing broken packages](https://nixos.org/manual/nixpkgs/stable/#sec-allow-broken) in the NixOS manual. 101 101 ''; 102 102 }; 103 103 ··· 106 106 default = false; 107 107 # getEnv part is in check-meta.nix 108 108 defaultText = literalExpression ''false || builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1"''; 109 - description = '' 109 + description = lib.mdDoc '' 110 110 Whether to allow unsupported packages. 111 111 112 - See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-unsupported-system">Installing packages on unsupported systems</link> in the NixOS manual. 112 + See [Installing packages on unsupported systems](https://nixos.org/manual/nixpkgs/stable/#sec-allow-unsupported-system) in the NixOS manual. 113 113 ''; 114 114 }; 115 115 116 116 showDerivationWarnings = mkOption { 117 117 type = types.listOf (types.enum [ "maintainerless" ]); 118 118 default = []; 119 - description = '' 119 + description = lib.mdDoc '' 120 120 Which warnings to display for potentially dangerous 121 121 or deprecated values passed into `stdenv.mkDerivation`. 122 122 123 123 A list of warnings can be found in 124 - <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/check-meta.nix">/pkgs/stdenv/generic/check-meta.nix</link>. 124 + [/pkgs/stdenv/generic/check-meta.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/check-meta.nix). 125 125 126 126 This is not a stable interface; warnings may be added, changed 127 127 or removed without prior notice.