nixos/documentation: add option to disable redirects
Related to issue #https://github.com/NixOS/nixpkgs/issues/412451
This commit is contained in:
		
							parent
							
								
									3390360529
								
							
						
					
					
						commit
						aeedfab1bf
					
				@ -8,6 +8,7 @@
 | 
			
		||||
  baseOptionsJSON ? null,
 | 
			
		||||
  warningsAreErrors ? true,
 | 
			
		||||
  prefix ? ../../..,
 | 
			
		||||
  checkRedirects ? true,
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
let
 | 
			
		||||
@ -146,7 +147,7 @@ rec {
 | 
			
		||||
 | 
			
		||||
        nixos-render-docs -j $NIX_BUILD_CORES manual html \
 | 
			
		||||
          --manpage-urls ${manpageUrls} \
 | 
			
		||||
          --redirects ${./redirects.json} \
 | 
			
		||||
          ${if checkRedirects then "--redirects ${./redirects.json}" else ""} \
 | 
			
		||||
          --revision ${escapeShellArg revision} \
 | 
			
		||||
          --generator "nixos-render-docs ${pkgs.lib.version}" \
 | 
			
		||||
          --stylesheet style.css \
 | 
			
		||||
 | 
			
		||||
@ -69,6 +69,7 @@ let
 | 
			
		||||
    version = config.system.nixos.release;
 | 
			
		||||
    revision = "release-${version}";
 | 
			
		||||
    extraSources = cfg.nixos.extraModuleSources;
 | 
			
		||||
    checkRedirects = cfg.nixos.checkRedirects;
 | 
			
		||||
    options =
 | 
			
		||||
      let
 | 
			
		||||
        scrubbedEval = evalModules {
 | 
			
		||||
@ -353,6 +354,14 @@ in
 | 
			
		||||
        '';
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      nixos.checkRedirects = mkOption {
 | 
			
		||||
        type = types.bool;
 | 
			
		||||
        default = true;
 | 
			
		||||
        description = ''
 | 
			
		||||
          Check redirects for manualHTML.
 | 
			
		||||
        '';
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user