···367367 '';
368368369369 checkPhase =
370370- # GHC (=> shellcheck) isn't supported on some platforms (such as risc-v)
371371- # but we still want to use writeShellApplication on those platforms
372370 let
373373- shellcheckSupported =
374374- lib.meta.availableOn stdenv.buildPlatform shellcheck-minimal.compiler
375375- && (builtins.tryEval shellcheck-minimal.compiler.outPath).success;
376371 excludeFlags = lib.optionals (excludeShellChecks != [ ]) [
377372 "--exclude"
378373 (lib.concatStringsSep "," excludeShellChecks)
379374 ];
380380- shellcheckCommand = lib.optionalString shellcheckSupported ''
375375+ # GHC (=> shellcheck) isn't supported on some platforms (such as risc-v)
376376+ # but we still want to use writeShellApplication on those platforms
377377+ shellcheckCommand = lib.optionalString shellcheck-minimal.compiler.bootstrapAvailable ''
381378 # use shellcheck which does not include docs
382379 # pandoc takes long to build and documentation isn't needed for just running the cli
383380 ${lib.getExe shellcheck-minimal} ${
···839839 # TODO(@sternenseemann): there's no stage0:exe:haddock target by default,
840840 # so haddock isn't available for GHC cross-compilers. Can we fix that?
841841 hasHaddock = stdenv.hostPlatform == stdenv.targetPlatform;
842842+843843+ bootstrapAvailable = lib.meta.availableOn stdenv.buildPlatform bootPkgs.ghc;
842844 };
843845844846 meta = {