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