treewide: more accurate pandoc availability check #404599

+21 -21
+3 -6
pkgs/build-support/trivial-builders/default.nix
··· 367 367 ''; 368 368 369 369 checkPhase = 370 - # GHC (=> shellcheck) isn't supported on some platforms (such as risc-v) 371 - # but we still want to use writeShellApplication on those platforms 372 370 let 373 - shellcheckSupported = 374 - lib.meta.availableOn stdenv.buildPlatform shellcheck-minimal.compiler 375 - && (builtins.tryEval shellcheck-minimal.compiler.outPath).success; 376 371 excludeFlags = lib.optionals (excludeShellChecks != [ ]) [ 377 372 "--exclude" 378 373 (lib.concatStringsSep "," excludeShellChecks) 379 374 ]; 380 - shellcheckCommand = lib.optionalString shellcheckSupported '' 375 + # GHC (=> shellcheck) isn't supported on some platforms (such as risc-v) 376 + # but we still want to use writeShellApplication on those platforms 377 + shellcheckCommand = lib.optionalString shellcheck-minimal.compiler.bootstrapAvailable '' 381 378 # use shellcheck which does not include docs 382 379 # pandoc takes long to build and documentation isn't needed for just running the cli 383 380 ${lib.getExe shellcheck-minimal} ${
+3 -3
pkgs/by-name/fl/flac/package.nix
··· 6 6 lib, 7 7 libogg, 8 8 nix-update-script, 9 - pandoc, 9 + buildPackages, 10 10 pkg-config, 11 11 stdenv, 12 12 versionCheckHook, 13 - enableManpages ? !stdenv.buildPlatform.isRiscV64 && !stdenv.buildPlatform.isLoongArch64, 13 + enableManpages ? buildPackages.pandoc.compiler.bootstrapAvailable, 14 14 }: 15 15 stdenv.mkDerivation (finalAttrs: { 16 16 pname = "flac"; ··· 30 30 doxygen 31 31 graphviz 32 32 pkg-config 33 - ] ++ lib.optional enableManpages pandoc; 33 + ] ++ lib.optional enableManpages buildPackages.pandoc; 34 34 35 35 buildInputs = [ libogg ]; 36 36
+3 -6
pkgs/by-name/ni/nixos-firewall-tool/package.nix
··· 3 3 lib, 4 4 bash, 5 5 installShellFiles, 6 - shellcheck-minimal, 6 + buildPackages, 7 7 }: 8 8 9 9 stdenvNoCC.mkDerivation { ··· 14 14 strictDeps = true; 15 15 buildInputs = [ bash ]; 16 16 nativeBuildInputs = [ installShellFiles ]; 17 - nativeCheckInputs = [ shellcheck-minimal ]; 17 + nativeCheckInputs = [ buildPackages.shellcheck-minimal ]; 18 18 19 19 postPatch = '' 20 20 patchShebangs --host nixos-firewall-tool ··· 26 26 installShellCompletion nixos-firewall-tool.{bash,fish} 27 27 ''; 28 28 29 - # Skip shellcheck if GHC is not available, see writeShellApplication. 30 - doCheck = 31 - lib.meta.availableOn stdenvNoCC.buildPlatform shellcheck-minimal.compiler 32 - && (builtins.tryEval shellcheck-minimal.compiler.outPath).success; 29 + doCheck = buildPackages.shellcheck-minimal.compiler.bootstrapAvailable; 33 30 checkPhase = '' 34 31 shellcheck nixos-firewall-tool 35 32 '';
+2
pkgs/development/compilers/ghc/8.10.7.nix
··· 640 640 641 641 # Our Cabal compiler name 642 642 haskellCompilerName = "ghc-${version}"; 643 + 644 + bootstrapAvailable = lib.meta.availableOn stdenv.buildPlatform bootPkgs.ghc; 643 645 }; 644 646 645 647 meta = {
+2
pkgs/development/compilers/ghc/common-hadrian.nix
··· 839 839 # TODO(@sternenseemann): there's no stage0:exe:haddock target by default, 840 840 # so haddock isn't available for GHC cross-compilers. Can we fix that? 841 841 hasHaddock = stdenv.hostPlatform == stdenv.targetPlatform; 842 + 843 + bootstrapAvailable = lib.meta.availableOn stdenv.buildPlatform bootPkgs.ghc; 842 844 }; 843 845 844 846 meta = {
+2
pkgs/development/compilers/ghc/common-make-native-bignum.nix
··· 645 645 646 646 # Our Cabal compiler name 647 647 haskellCompilerName = "ghc-${version}"; 648 + 649 + bootstrapAvailable = lib.meta.availableOn stdenv.buildPlatform bootPkgs.ghc; 648 650 }; 649 651 650 652 meta = {
+3 -3
pkgs/development/libraries/gssdp/1.6.nix
··· 7 7 pkg-config, 8 8 gobject-introspection, 9 9 vala, 10 - enableManpages ? !stdenv.buildPlatform.isLoongArch64 && !stdenv.buildPlatform.isRiscV64, 11 - pandoc, 10 + buildPackages, 11 + enableManpages ? buildPackages.pandoc.compiler.bootstrapAvailable, 12 12 gi-docgen, 13 13 python3, 14 14 libsoup_3, ··· 44 44 vala 45 45 gi-docgen 46 46 python3 47 - ] ++ lib.optionals enableManpages [ pandoc ]; 47 + ] ++ lib.optionals enableManpages [ buildPackages.pandoc ]; 48 48 49 49 buildInputs = [ 50 50 libsoup_3
+3 -3
pkgs/development/libraries/nuspell/default.nix
··· 3 3 stdenv, 4 4 fetchFromGitHub, 5 5 cmake, 6 - pandoc, 6 + buildPackages, 7 7 pkg-config, 8 8 icu, 9 9 catch2_3, 10 - enableManpages ? !stdenv.buildPlatform.isRiscV64 && !stdenv.buildPlatform.isLoongArch64, 10 + enableManpages ? buildPackages.pandoc.compiler.bootstrapAvailable, 11 11 }: 12 12 13 13 stdenv.mkDerivation rec { ··· 27 27 pkg-config 28 28 ] 29 29 ++ lib.optionals enableManpages [ 30 - pandoc 30 + buildPackages.pandoc 31 31 ]; 32 32 33 33 buildInputs = [ catch2_3 ];